gallium/winsys: replace calls to dup(2) with fcntl(F_DUPFD_CLOEXEC)