This adds a basic test that __cxa_atexit works, and also adds some tests for __cxa_atexit handlers registered in the middle of __cxa_finalize. PR: 285870 (cherry picked from commit ee9ce1078c596f5719f312feedd616ab0fb41dc9)