Safe Multi-Agent Reinforcement Learning with Bilevel Optimization in Autonomous Driving