Improve messages in case of system exit. This prints a better set of error messages in case someone calls `os._exit()` or in C code `exit()` is used.

Resolves #3486.

- [x] Add a [CHANGELOG](https://github.com/pyodide/pyodide/blob/main/docs/project/changelog.md) entry

queries:
  - exclude: py/import-and-import-from

extraction:
  cpp:
    prepare:
      packages:
        - python3-yaml

queries:
  - exclude: py/import-and-import-from

extraction:
  cpp:
    prepare:
      packages:
        - python3-yaml
