log: add Log::is_inside_log_lock()

Signed-off-by: Sage Weil <sage@redhat.com>
global/signal_handler: do not log if SEGV originated inside log code

Signed-off-by: Sage Weil <sage@redhat.com>
log: add simple test to verify an internal SEGV doesn't hang

Test that the segv injection works.

Test that a segv while logging something doesn't hang when the signal
handlers are installed.  Note that this fails/hangs without the previous
fix.

Signed-off-by: Sage Weil <sage@redhat.com>
Merge pull request #2478 from ceph/wip-9445

global: fix hang when segv happens inside logging code

Reviewed-by: Loic Dachary <loic-201408@dachary.org>