Australia have suffered a major setback ahead of the third and final Test against South Africa, with Steve Smith ruled out of the series decider due to a neck injury.