SERVER-10431 Split synchronous signal handlers into new library; use them in unit tests.

With this change, unit tests that segfault or abort will correctly print stack traces.