Improved machine agent test setup functionality

In preparation for upcoming upgrade changes:
- machines created by primeAgent now have a pinger running so that
  EnsureAvailability can be used in tests to create additional state
  servers
- separated machine configuration from creation in primeAgent to allow
  machines created through other means (e.g. EnsureAvailability) to
  still be configured for use with machine agents
cmd/jujud: synchronise state server upgrades

Use state's UpgradeInfo to synchronise state server upgrades. Overview:

- after restarting into a new tools version, master state servers will
  wait up to 15 minutes for any other state servers to indicate they
  are ready for upgrade. A downgrade to the previous tools version
  will occur if this wait times out.
- secondary state servers will wait until the master has completed its
  upgrade (to allow DB schema migrations to happen first)
- as state servers complete their upgrades they report this to the
  UpgradeInfo document. The document is archived once the last state
  server completes its upgrade.
Add new wrench points for upgrade-steps worker
Merge pull request #709 from mjs/upgrade-sync

cmd/jujud: synchronise state server upgrades

Use state's UpgradeInfo to synchronise state server upgrades. Overview:
    
- after restarting into a new tools version, master state servers will wait up to 15 minutes for any other state servers to indicate they are ready for upgrade. A downgrade to the previous tools version will occur if this wait times out.
- secondary state servers will wait until the master has completed its upgrade (to allow DB schema migrations to happen first)
- as state servers complete their upgrades they report this to the UpgradeInfo document. The document is archived once the last state server completes its upgrade.

Note that some refactoring to the implementation and tests is planned immediately after this PR lands. I didn't include them here because I didn't want to clutter up this PR any further.