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.
The way errors are handled inside and after the ChangeConfig calls is a bit messy. A change to ChangeConfig which will help with this is coming in a future PR.