How Populations Cohere: Five Rules for Cooperation