Helping Middle-Income Energy Exporters Kick the Fossil-Fuel Habit