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