Back-port NIO endpoint changes required to support concurrent read/write for JSR-356 upgraded connections

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1516407 13f79535-47bb-0310-9956-ffa450edef68
Fix comment typo

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1516409 13f79535-47bb-0310-9956-ffa450edef68
Fix some NPEs observed while investigating some unit test failures.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1516410 13f79535-47bb-0310-9956-ffa450edef68
Backport
Remove unnecessary code

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