A Study of Building Thermal Dynamics from Large Data Sets: An Application for Residential Smart Thermostats