cmd/jujud: synchronise upgrade steps and ensureMongoServer
cmd/jujud: synchronise upgrade steps and ensureMongoServer

It's possible for the upgrade steps to complete before the
state worker starts, thus preventing it from initialising
mongo properly on upgrade. This PR makes it so that the
upgrade steps runner waits for ensureMongoServer to finish
before proceeding.

Maybe fixes https://bugs.launchpad.net/juju-core/+bug/1334273

mhilton/juju,dooferlad/juju,bogdanteleaga/juju,axw/juju,mhilton/juju-juju,cloud-green/juju,kat-co/juju,AdamIsrael/juju,tasdomas/juju,cherylj/juju,marcmolla/juju,alesstimec/juju,dimitern/juju,reedobrien/juju,bogdanteleaga/juju,marcoceppi/juju,thomnico/juju,cloud-green/juju,tsakas/juju,voidspace/juju,macgreagoir/juju,frankban/juju-tmp,fwereade/juju,mikemccracken/juju,tasdomas/juju,tasdomas/juju,dooferlad/juju,thomnico/juju,anastasiamac/juju,wwitzel3/juju,sinzui/juju,mikemccracken/juju,waigani/juju,reedobrien/juju,waigani/juju,bac/juju,marcmolla/juju,bz2/juju,mikemccracken/juju,Altoros/juju-cloudsigma,Altoros/juju-vmware,mjs/juju,howbazaar/juju,macgreagoir/juju,marcoceppi/juju,frankban/juju-tmp,tasdomas/juju,mhilton/juju,AdamIsrael/juju,cmars/juju,waigani/juju,ericsnowcurrently/juju,bogdanteleaga/juju,wwitzel3/juju,Altoros/juju-vmware,mhilton/juju,Altoros/juju-vmware,alesstimec/juju,fwereade/juju,frankban/juju,mjs/juju,marcoceppi/juju,cherylj/juju,mjs/juju,frankban/juju,AdamIsrael/juju,howbazaar/juju,davecheney/juju,davecheney/juju,tsakas/juju,bz2/juju,ericsnowcurrently/juju,bac/juju,marcmolla/juju,mjs/juju,jrwren/juju,bz2/juju,Altoros/juju-cloudsigma,alesstimec/juju,kat-co/juju,ericsnowcurrently/juju,Altoros/juju-cloudsigma,davecheney/juju,tsakas/juju,macgreagoir/juju,mhilton/juju-juju,voidspace/juju,macgreagoir/juju,anastasiamac/juju,tych0/juju,gabriel-samfira/juju,AdamIsrael/juju,frankban/juju-tmp,makyo/juju,marcoceppi/juju,jrwren/juju,mhilton/juju-juju,cmars/juju,bz2/juju,sinzui/juju,axw/juju,Altoros/juju-cloudsigma,cmars/juju,frankban/juju,tsakas/juju,reedobrien/juju,mikemccracken/juju,kat-co/juju,sinzui/juju,gabriel-samfira/juju,axw/juju,ericsnowcurrently/juju,frankban/juju,howbazaar/juju,thomnico/juju,dimitern/juju,wwitzel3/juju,voidspace/juju,sinzui/juju,thomnico/juju,mjs/juju,alesstimec/juju,voidspace/juju,cherylj/juju,kat-co/juju,dimitern/juju,frankban/juju,bz2/juju,mhilton/juju-juju,makyo/juju,macgreagoir/juju,dimitern/juju,davecheney/juju,perrito666/juju,tych0/juju,bac/juju,axw/juju,anastasiamac/juju,cloud-green/juju,anastasiamac/juju,perrito666/juju,bogdanteleaga/juju,bac/juju,howbazaar/juju,makyo/juju,marcmolla/juju,wwitzel3/juju,kat-co/juju,cloud-green/juju,gabriel-samfira/juju,mjs/juju,dooferlad/juju,cherylj/juju,makyo/juju,marcmolla/juju,anastasiamac/juju,reedobrien/juju,perrito666/juju,Altoros/juju-vmware,axw/juju,howbazaar/juju,fwereade/juju,dimitern/juju,ericsnowcurrently/juju,cmars/juju,dooferlad/juju,mhilton/juju,mikemccracken/juju,dooferlad/juju,bac/juju,jrwren/juju,perrito666/juju,gabriel-samfira/juju,gabriel-samfira/juju,fwereade/juju,tych0/juju,mjs/juju,perrito666/juju,tych0/juju,alesstimec/juju,frankban/juju-tmp,reedobrien/juju,waigani/juju