Merge r1523384 and r1523615 from trunk:

On Windows, a socket timeout isn't implemented with
non-blocking socket + poll.  When a socket is non-
blocking and a timeout is set, the non-blocking
state must be disabled.

(plus the subsequent fix to adjust the socket state)


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1531094 13f79535-47bb-0310-9956-ffa450edef68