mds: Avoid assertions in shutdown

"MDS::suicide() was tearing down the objecter, but it was possible
for a _dispatch call to still be in process (#5382) while that happened
if called from a signal handler.  Fix this by checking for DNE state
every time mds_lock is taken, including in the various places it's
dropped during _dispatch.

Fixes: #5382"

Here, we can do a proper review for you, @jcsp. :)