South Africa’s economy at a pivotal point as outlook improves but political, energy risks remain