China's factory activity contracted for a second straight month in November as weak domestic demand and high production costs weighed on manufacturers.