Thermal Evolution of the Earth: Effects of Volatile Exchange Between Atmosphere and Interior