Plan Online, Learn Offline: Efficient Learning and Exploration via Model-Based Control