libsupc++: try cxa_thread_atexit_impl at runtime

g++.dg/tls/thread_local-order2.C fails when the toolchain is built for
a platform that lacks __cxa_thread_atexit_impl, even if the program is
built and run using that toolchain on a (later) platform that offers

This patch adds runtime testing for __cxa_thread_atexit_impl on select
platforms (GNU variants, for starters) that support weak symbols.

for  libstdc++-v3/ChangeLog

	PR libstdc++/112858
	* config/os/gnu-linux/os_defines.h
	* libsupc++/ [__GXX_WEAK__ &&
	(__cxa_thread_atexit): Add dynamic detection of
2 files changed