Real-Time Gait Adaptation for Quadrupeds using Model Predictive Control and Reinforcement Learning