The UAE says it is leaving the Opec and Opec+ groups of major oil producing nations.