Refactor to register and unregister endpoint instances and session instances rather than endpoint classes and session instances. This is required to support implementation of WebSocket 1.0, section 7.2