Categories in thermodynamics