Australia wrap up a consolation seven-wicket victory in the final Test in Adelaide as South Africa win the series 2-1.