unix: omit second fcntl() call if possible

Omit the fcntl() syscall when the O_NONBLOCK or FD_CLOEXEC is already
set/clear because it's a no-op in that case.