fdReady: use poll() instead of select()
fdReady: use poll() instead of select()

select() is limited to 1024 file descriptors.  This actually blew up
in a very hard-to-debug way in our production system when using the
hinotify package.

Test Plan:
libraries/tests pass, paricularly hGetBuf001 which exercises this
code.

Reviewers: niteria, erikd, austin, hvr, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2785

GHC Trac Issues: #12912

(cherry picked from commit f46369b8a1bf90a3bdc30f2b566c3a7e03672518)

GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc