ChessEngine: fix minor file descriptor leaks
Don't leave an orphaned engine if we crash

If we crash or receive a signal that kills us, the chess engine might
live on forever. Linux (and only Linux) provides a nice way to avoid
this by tying the life of a child process to its parent. Use it.

(To get equivalent behavior on other systems, we would need to fork a
third process to function as a monitor, which is not worth the bother.
Non-Linux users should simply not crash the game.)