poll-loop: Make poll_fd_wait_event() cross-platform.
This is helpful if we want to wait either on 'fd' for POSIX or
events for Windows.
For Windows, if both 'fd' and 'wevent' is specified, we associate
that event with the 'fd' using WSAEventSelect() in poll_block().
So any 'events' on that 'fd' will wake us up from WaitForMultipleObjects().
WSAEventSelect() does not understand POLLIN, POLLOUT etc. Instead the
macros it understands are FD_READ, FD_ACCEPT, FD_CONNECT, FD_CLOSE etc.
So we need to make that transition.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>