Add documentation for the shutdown afun also modify the order
of the shutdown command so it does a dump if needed before the call_out
to the shutdown command.