At least 32 people died after a dam burst in central Kenya, sweeping away their homes while many of them were asleep, police said.