Safe Exploration In Reinforcement Learning: Theory And Applications In Robotics