Skipper Kane Williamson struck a composed unbeaten century as New Zealand virtually knocked South Africa out of the World Cup with a four-wicket victory