Thermodynamic properties of stochastic quantum measurements