Spinners Nauman Ali and Yasir Shah rattled South Africa to help Pakistan win the first Test inside four days in Karachi