chore: extra pthread handling safety (#2390)
adds extra safety handling for when frankenphp is forked:
- on linux, when the parent thread dies, all children automatically
receive SIGKILL
- likewise on freebsd, when the parent process dies
- other *nix platforms manually listen on kqueue until parent (process)
end is closed, then terminate
- windows has no forking, so no changes thete
unlikely to be needed, but better safe than sorry
---------
Signed-off-by: Marc <m@pyc.ac>
Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>