BAA agrees to sell Stansted Airport, drops appeals