Thermodynamic aspects of the quantum measurement process