Performance improvement
The context class loader was set in *Endpoint#processSocket() in case a new thread was created since this method may be triggered from web application code and that in turn would trigger a memory leak since the thread would end up with the web app class loader as its context class loader. However, this is only an issue when creating threads and since getting the current class loader is expensive, move this code to where threads are created rather than calling it on every call to *Endpoint#processSocket().
This appears (on my fairly unscientific tests) to remove ~5% of the overhead from all request processing.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1551340 13f79535-47bb-0310-9956-ffa450edef68
Performance improvement
Partial fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=55855
Make the adding of the WsFilter lazy so it doesn't get added to web apps that don't need it.

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