American Airlines, a storied but struggling carrier that sought bankruptcy protection 15 months ago, has agreed to merge with US