runtime: use _exit on darwin
runtime: use _exit on darwin

On darwin, where we use libc for syscalls, when the runtime exits,
it calls libc exit function, which may call back into user code,
e.g. invoking functions registered with atexit. In particular, it
may call back into Go. But at this point, the Go runtime is
already exiting, so this wouldn't work.

On non-libc platforms we use exit syscall directly, which doesn't
invoke any callbacks. Use _exit on darwin to achieve the same
behavior.

No test for now, as it doesn't pass on all platforms (see trybot
run of PS2).

May fix #42465.
May fix #43294.

Change-Id: Ia1ada22b5da8cb64fdd598d0541eb90e195367eb
Reviewed-on: https://go-review.googlesource.com/c/go/+/269378
Trust: Cherry Zhang <d62e63aa42ce272d7b6a5055d97e942b33a34679@google.com>
Run-TryBot: Cherry Zhang <d62e63aa42ce272d7b6a5055d97e942b33a34679@google.com>
TryBot-Result: Go Bot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>

nawawi/go,nawawi/go,cloudflare/go,nawawi/go,golang/go,cloudflare/go,CAFxX/go,CAFxX/go,cloudflare/go,nawawi/go,CAFxX/go,golang/go,cloudflare/go,golang/go,cloudflare/go,CAFxX/go,nawawi/go,cloudflare/go,CAFxX/go,golang/go,cloudflare/go,golang/go,nawawi/go,golang/go,cloudflare/go,golang/go,CAFxX/go,nawawi/go,CAFxX/go,nawawi/go,CAFxX/go,golang/go