World Cup: South Africa ride on Tahir’s four-for to beat Afghanistan and keep semi-final hopes alive