Add a couple of utility methods

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1437225 13f79535-47bb-0310-9956-ffa450edef68
Refactor so client and server can share common code for WsFrame and WsRemoteEndpoint.
Provide a first draft implementation of a WebSocket client. (A simple test with an echo style endpoint works.)
 - Message sending is now based around sending an async message with a completion handler. All other message sending types wrap this core type.
 - Implemented Session.isOpen()
 - First draft of WebSocketContainer.connectToServer()
 - Fixed various issues with the tests for WebSocketContainer.connectToServer()
 - Masking / no masking now depends on direction.
 - Lots of TODOs throughout the new code.


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