wasi: add returnOnExit option
This commit adds a WASI option allowing the __wasi_proc_exit()
function to return an exit code instead of forcefully terminating the process.
Fixes: https://github.com/nodejs/node/issues/32093
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines