mds: mark objecter completions with _IO_, take mds_lock

For any completion we pass directly to Objecter, make sure we take the
mds_lock in finish(), and mark the class with _IO_ in the name.

Note that this doesn't address the use of Journaler.  And this assumes that
we are not holding the mds_lock already when Objecter::handle_osd_op_reply
is called.

Signed-off-by: Sage Weil <sage@redhat.com>
mds: push objecter completions to a Finisher

Most/all of the MDS completions need to be reentrant (and potentially
call back into the Objecter).  Shove them all onto a Finisher to make
sure that is safe.

Signed-off-by: Sage Weil <sage@redhat.com>
include/Context: add generic C_Lock

Wrap a callback in a Mutex.

Signed-off-by: Sage Weil <sage@redhat.com>
client: add a Finisher for the Objecter

Signed-off-by: Sage Weil <sage@redhat.com>
client: let Objecter dispatch directly

Add Objecter as a direct dispatcher.  Drop all of the callbacks and
messages we were passing along.  Wrap the IO completions in client_lock
(via C_Lock) and shunt them to the objecter_finisher.

Signed-off-by: Sage Weil <sage@redhat.com>
librados dispatch fix
mon/MonClient: fix shutdown typo

Signed-off-by: Sage Weil <sage@redhat.com>
osdc/Objecter: ignore messenger events before or after initalized

Signed-off-by: Sage Weil <sage@redhat.com>
librados: wait for map on create_ioctx

Ensure we have a map so we don't simply complain that a pool doesn't
exists.

NOTE: we should probably do the retry on ENOENT thing we do in the
Objecter here too...

Signed-off-by: Sage Weil <sage@redhat.com>