The airlines agreed to maintain some routes and meet other conditions to secure the Transportation Department’s approval of their merger.