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

def test_pytest_benchmark(selenium):
    selenium.run_js(
        """
        await pyodide.loadPackage(["pytest-benchmark", "pytest"]);
        pyodide.FS.mkdir("/tests")
        pyodide.FS.writeFile("/tests/test_blah.py",
`
import pytest

@pytest.mark.benchmark
def test_blah(benchmark):
    @benchmark
    def f():
        for i in range(100_000):
            pass
    assert benchmark.stats.stats.min >= 0.000001
    assert benchmark.stats.stats.max <= 10
`
        );
        pyodide.FS.chdir("/tests");
        const pytest = pyodide.pyimport("pytest");
        pytest.main();
        pytest.destroy();
        """
    )
    assert "benchmark: 1 tests" in selenium.logs
    assert "Name (time in ms)" in selenium.logs

def test_pytest_benchmark(selenium):
    selenium.run_js(
        """
        await pyodide.loadPackage(["pytest-benchmark", "pytest"]);
        pyodide.FS.mkdir("/tests")
        pyodide.FS.writeFile("/tests/test_blah.py",
`
import pytest

@pytest.mark.benchmark
def test_blah(benchmark):
    @benchmark
    def f():
        for i in range(100_000):
            pass
    assert benchmark.stats.stats.min >= 0.000001
    assert benchmark.stats.stats.max <= 10
`
        );
        pyodide.FS.chdir("/tests");
        const pytest = pyodide.pyimport("pytest");
        pytest.main();
        pytest.destroy();
        """
    )
    assert "benchmark: 1 tests" in selenium.logs
    assert "Name (time in ms)" in selenium.logs
