South Africa score bonus-point win after Tonga test