An evolutionary model for the development of trust in democracies