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
cmd/jujud: avoid duplicate code for counting upgrade attempts in upgrade tests
cmd/jujud: avoid duplication in the 2 "success" upgrade test cases
cmd/jujud: shorten upgrade test helper names

Makes the tests a little more readable.
cmd/jujud: rationalise machine & config handling in upgrade tests

These tests have always been a bit confusing because machine-0 and its
config were being stored on the test suite, with various helper
methods magically using them as required. Data associated with other
machines have always been stored in local variables and passed around.

This change makes the data for machine-0 be handled consistently. This
makes for more explicit, clearer tests and has allowed for various
cleanups.