test: fix domain with abort-on-uncaught on PPC
Add SIGTRAP and the corresponding exit code to the list of signals/exit codes that are expected when running tests that throw an uncaught error and have --abort-on-uncaught-exception enabled.
Also refactor a bit related comments so that they better reflect what's actually happening.
Fixes #3239 (closed).