Thermodynamics of slow solutions to the gas-piston equations