[libc++abi][NFCI] Refactor demangling_terminate_handler to reduce nesting

This keeps the same logic, but uses early return to avoid multiple layers
of nested ifs and make the code simpler to follow.

Differential Revision: https://reviews.llvm.org/D125476

GitOrigin-RevId: f21cf11a4c1d4b09f956e50706307fe986f527dc
1 file changed