China’s factory activity contracted for a seventh month in October as weak domestic demand and a faltering property sector weighed on growth, despite modest gains in industrial output and profits.