Who wrote the social contract about the agreement between the people and the government in which people gave up some freedom in order to have their rights protected?.