BP will sell upstream assets that account for about a quarter of its production