Data-Driven Modeling and Analysis of Residential Building Energy Consumption and Demand Flexibility