Reinforcement Learning for Orientation Estimation Using Inertial Sensors with Performance Guarantee