Economic Origins of Dictatorship and Democracy