Thermodynamics of charged, rotating, and accelerating black holes