A Review of Safe Reinforcement Learning: Methods, Theory and Applications