Integrating Sample-Based Planning and Model-Based Reinforcement Learning