Make sockets usable 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/trunk@1490006 13f79535-47bb-0310-9956-ffa450edef68