cmd/jujud: extract the upgrade steps worker

Make the upgrade steps worker code more testable by ripping it out of
the machine agent.
cmd/jujud: rework upgrade tests

Take advantage of extracted upgrade steps worker. The upgrade tests
are now significantly simpler and faster.
upgradeWorkerFactory refactored to upgradeWorkerContext

Somewhat cleaner.
Merge pull request #353 from mjs/extract-upgrade-steps-worker

Extract upgrade steps worker

Make the upgrade steps worker code more testable by ripping it out of the machine agent. Take advantage of this to make the upgrade tests significantly simpler and faster.

This is all in preparation for further changes around state agent synchronisation during upgrades.