cmd/jujud: upgrade status & error handling

The fact that a machine agent is upgrading is now reported in status. Upgrade errors are now also reported in status.

If an upgrade fails completely the machine agent will now never signal that the upgrade is done. This prevents the majority of workers from running, preventing the agent from becoming fully operational without the upgrade being complete (which could be dangerous). At this point the user would need to take steps to manually recover.
It's not immediately obvious what generates this err (and err itself is defined even further away)
Could we define a var upgradeErr error at the top of the for loop and inside the loop use upgradeErr = upgradesPerformUpgrade, athis then becomes if upgradeErr != nil ...