Uber will stop using diesel cars in the UK capital within two years so the majority of its rides are in electric or hybrid vehicles.