South Africa’s economy showed signs of losing momentum in the second quarter, with mining, manufacturing and electricity output weakening as higher inflation put households under pressure.