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.


couple of thoughts, not necessarily sane:

 * we can get jobs from apiState
 * the upgradingMachineAgent itself isn't likely to change, so we could just stick it in the struct