Rahmanullah Gurbaz’s seventh ODI century led Afghanistan to a historic series win over South Africa, equalling Virat Kohli's record for most ODI centuries before turning 23.