Codazzi tensors and their space-times, and Cotton gravity