illumos pipe handling fixes
illumos pipe handling fixes

illumos systems have had pipe2(2) since bug 3714 integrated in 2013, so
it is safe to expect and use that instead of pipe(2) plus a call to set
flags on the fd.  See also: https://www.illumos.org/issues/3714

While we have limited emulation of the BSD ioctl(FIONBIO) to make a file
descriptor non-blocking, it does not appear to work exactly as the test
suite expects.  Instead, use fcntl(F_SETFL) to set O_NONBLOCK.

carllerche/mio,carllerche/mio