Barrier Function-based Safe Reinforcement Learning for Formation Control of Mobile Robots