How Society Makes Itself: The Evolution of Political and Economic Institutions