United, pilots agree on plan to avoid nearly 3,000 furloughs