fix lp:1342937 restore fails if apt running

Stop jujud before everything else so no worker will be running when we destroy the basic bootstrap.
Retry APT to make sure it is not failing because some other apt is finishing.