Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56857
Merged revision 1618169 from tomcat/trunk:
Fix thread safety issue when calling ServletContext methods while running under a security manager.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1622215 13f79535-47bb-0310-9956-ffa450edef68
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56907
Ensure that client IO threads are stopped if a secure WebSocket client connection fails.

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