Use the closefrom system call if available to close all fds.
If not available, fall back to fcntl(F_CLOSEM); if that's not
available, fall back to closing all fds up to and including
fcntl(F_MAXFD); if that's not available, fall back to closing all
fds below UX_SC_OPEN_MAX like before.
Each case tested under NetBSD by running runtime/test-process.scm,
evaluating (RUN-SHELL-COMMAND "ls"), and ktracing Scheme during
(RUN-SUBPROCESS-IN-FOREGROUND "/usr/bin/true" '#("true") '#())
with `ktrace -d -i' to make sure that it uses the right sequence of
system calls.