We used to think that as China became wealthier, it would become more like the west. Yet the country is being transformed by internal disputes between its new right and left, with unpredictable consequences for the world