Cosmological Calorimetry: The nature of the intergalactic medium and the photon underproduction crisis