restructure socket storage

Adding some features to the socket storage in WebSocketBase and trying to fix some bugs