Learning Realistic Traffic Agents in Closed-loop