[compiler-rt][ORC][COFF] Run atexit callbacks in LIFO order (#214053)

The COFF runtime stores atexit callbacks in registration order, but
executes them in the same order during JITDylib deinitialization.

Run callbacks from the back of the vector so that they execute in
reverse registration order, and add a regression test.

This was found while investigating #213568.

Assisted-by: OpenAI Codex
GitOrigin-RevId: a1cf9756a9eea33db971a637fec51ace309eada2
2 files changed