New function UX_prim_check_fd_errno to to be used after a system call
that creates file descriptors fails. If errno is EMFILE or ENFILE,
this requests a garbage collection in case any unreferenced file
descriptors can be closed. Change OS_make_pipe to call this if
pipe(2) fails.
New macro STD_FD_SYSTEM_CALL is like STD_UINT_SYSTEM_CALL but uses
UX_prim_check_fd_errno rather than UX_prim_check_errno. Change
OS_open_*_file and OS_open_*_socket to use STD_FD_SYSTEM_CALL to call
open(2) and socket(2).
Change STD_*_SYSTEM_CALL to use do/while rather than braces for
compound statements and to call UX_prim_check_errno rather than
copying it in-line.