Online Linear Regression and Its Application to Model-Based Reinforcement Learning