States, Ideologies, and Social Revolutions