Only register for write when using non-blocking and there is more data to write. This fixes various crashes in APR due to trying to add the same socket to the poller twice.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1481165 13f79535-47bb-0310-9956-ffa450edef68