Cosmology with a SKA HI intensity mapping survey