American Airlines and flight attendants have reached deal to avoid a strike