gtestutils: pass open file descriptors to subprocess
The subprocess needs to access the test_log_fd. If the file descriptors are not left open, functions such as g_test_message may stomp on file descriptors open by the subprocess and cause bad behavior of the test.
(Tweaked by Philip Withnall bugzilla@tecnocode.co.uk to fix review comments.)
This is an updated version of !501 (closed), with review comments resolved.