utils: Add function to set FD_CLOEXEC on file descriptor