Added protected API for WebSocket creation

Exposes the WebSocket creation to subclasses so that they may inspect, override or decorate the websocket before it is instantiated. #232