Fix some issues with Servlet 3.1 non-blocking writes and APR identified by the 'unit' test.

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