Improve test so that it cannot hang forever (it will check it gets an exception and completed, instead).

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1580030 13f79535-47bb-0310-9956-ffa450edef68
- Actually follow the instructions on proper NIO2 shutdown. Much cleaner indeed.
- The downside is that the executor is exclusive to the thread group (no way around this), so it cannot be shared with other connectors.
- Add a warning if using a shared executor.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1580031 13f79535-47bb-0310-9956-ffa450edef68
Improve trigger of the onWritePossible notification.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1580032 13f79535-47bb-0310-9956-ffa450edef68
Forgot to check the return value for blocking writes as all other places do, oops (some platforms could be returning a negative value after a disconnect rather than throw an exception).

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