China August factory output, retail sales beat expectations