Activity in China’s factory sector contracted in January, an official survey showed, a far worse result than expected.