A Model Predictive Control Framework for Hybrid Systems