Text this: A thermodynamically consistent approach to the energy costs of quantum measurements