Thermal Deformation of Granite under Different Temperature and Pressure Pathways