Offline Goal-Conditioned Reinforcement Learning for Safety-Critical Tasks with Recovery Policy