A Study of Temperature Distribution and Thermal Stresses in a Hot Rock Due to Rapid Cooling