Thermodynamics of Autogenous Self-healing in Cementitious Materials