mds: separate inode recovery queue from MDCache

Refactor to:
* have somewhere to put some logic for doing
  background recovery in future.
* trim a few lines from the oversized MDCache.cc
  whereever we can.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: remove unused purge_prealloc_ino

Signed-off-by: John Spray <john.spray@redhat.com>
mds: make MDS::replay_done clearer

... and add some assertions.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: refactor MDS boot

* Make boot_start private.
* Define boot stages in enum, replace int with type.
* Merge steps 0 and 1, 0 always fell through to 1.
* starting_done was only ever reached by a fall through
  from the previous step, so call it directly from there.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: introduce explicit DaemonState instead of int

Signed-off-by: John Spray <john.spray@redhat.com>
mds: handle replaying old format journals

To get back to the reformatting procedure that otherwise
occurs during MDLog::open, introduce an MDLog::reopen call
that MDS can use in the standbyreplay->standby transition
for the special case where the journal is old.

Fixes: #8869

Signed-off-by: John Spray <john.spray@redhat.com>
mds: remove some rogue "using namespace std;"

Signed-off-by: John Spray <john.spray@redhat.com>
Merge pull request #2161 from ceph/wip-jcsp-test

Reviewed-by: Greg Farnum greg@inktank.com