Trade and the variety of democratic institutions