Thermodynamics of quantum spacetime histories