Make sockets useable for non-blocking IO. Return bytes written if >0 and error code is EAGAIN rather than the error code so the clients know how many bytes were written.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/native/branches/1.1.x@1490001 13f79535-47bb-0310-9956-ffa450edef68