The allrounder's century and seven-wicket haul helped South Africa inflict an innings defeat on Bangladesh