Call emergency_cleanup from shutdown on error

If one of the shutdown steps fails, flag the error and call
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.