How did the development of writing change the societies of ancient Mesopotamia and, specifically, the lives of their people?