Make rd.upgrade.debugshell shut down properly

rd.upgrade.debugshell should shut down at system shutdown so we don't
end up holding up the system umounts and such.
upgrade.service: go to emergency mode on failure

If the upgrade fails, something has gone really wrong. We should give
the user a chance to do something about that before we clean up and
reboot.
Bail into emergency mode if the upgrade fails

If the upgrade returns non-zero, we should bail out of the upgrade hook
accordingly - which will drop us to emergency mode.
write upgrade state to /var/tmp/upgrade.state

Currently this writes one of three strings which indicate the last known
status of the 'upgrade' hook:

  "running":  the upgrade hook has started.
  "finished": the upgrade hook returned an exit code of zero.
  "failed":   the upgrade hook returned a non-zero exit code.

This file can be used by upgrade-post scripts to react to an upgrade
failure, and it can be used by the system to report success/failure
after a reboot. It should be removed promptly when the system restarts
to avoid keeping stale state around.
upgrade-cleanup: skip cleanup on upgrade failure

If the upgrade fails, we shouldn't remove all our cached data - we might
need it for troubleshooting, or retries.
upgrade-post.service: skip reboot messages

doing 'systemctl isolate reboot.target' is the same as 'systemctl
reboot', except we skip the bit where it sends messages to the various
consoles. Which is fine, since nobody should be logged in anyway.
makefeduprepo: cleanups for missing /etc/os-release

Sometimes you might want to run makefeduprepo on a system that doesn't
have /etc/os-release. That's fine! We should handle that cleanly.