British Airways deal with staff ends two-year dispute