A private gauge of China’s factory activity swung to expansion in August, thanks to improved supply and market demand.