How the social organization of Europe and China shaped their divergent economic and political trajectories over the past millennium