move exotic functionality out of shutdown_and_wait, into hooks
That function was getting way too messy and chaotic. Let's setup a hooks system where we can shove more code without pollution the main function.
This should be a noop.
This is in preparation to adding support for tweaking mandos before rebooting (#3 (closed)).