libstdc++: Fix testcase by using terminate handler
This test was supposed to verify that when __libc_single_threaded is
available we successfully detect recursive static initialization even
when linked to libpthread. But I forgot to that when recursive init is
detected, we terminate, and so the test fails.
This adds a terminate handler that exits cleanly, so the test passes
when recursive init is detected.
libstdc++-v3/ChangeLog:
* testsuite/18_support/96817.cc: Use terminate handler that
calls _Exit(0).