Almost five years ago, BP embarked on an ambitious attempt to transform itself from an oil company into a business focused on low-carbon power.