osd: install async signal handlers after init()

The orderly shutdown in OSD assumes init() has completed.

Signed-off-by: Sage Weil <sage@inktank.com>
osd: do not assume we have an osdmap in prepare_to_stop

Signed-off-by: Sage Weil <sage@inktank.com>
mon: install signal handlers after init

Signed-off-by: Sage Weil <sage@inktank.com>
mds: install signal handlers after init

Signed-off-by: Sage Weil <sage@inktank.com>
mds: reorder suicide/shutdown a bit

* shutdown msgr last
* stop timer quickly, in case there are other events

Signed-off-by: Sage Weil <sage@inktank.com>
mon: shutdown: remove sessions under mon->lock

Signed-off-by: Sage Weil <sage@inktank.com>
mds: put g_ceph_context on shutdown

This makes us shut down lots of threads.

Signed-off-by: Sage Weil <sage@inktank.com>
mon, mds, osd: add early SIGTERM injection

This makes it easy to identify problems with (early) shutdown with a
loop like

 while [ ! -e core ] ; do ./ceph-mds -i a -c ceph.conf -f ; done

and a vstart cluster.

Signed-off-by: Sage Weil <sage@inktank.com>
Merge remote-tracking branch 'gh/wip-5624-b' into next

Reviewed-by: David Zafman <david.zafman@inktank.com>