Call emergency cleanup from shutdown on error

If one of the shutdown steps fail, flag the error and emergency_cleanup
instead of the more proper shutdown.

Since Frank's work on unexport will provide the underlying support for
state and cache_inode deconstruction, the other half (replacing most of
the code in cache_inode_destroyer) will wait until that is done.