Attempt to fix websocket daemon issue through tomcat snapshot version
Gracefully allow clients to exit when the server-side closes the websocket

- Use tomcat snapshot version that fixes the issue with a lingering thread
- Use daemon thread for the heartbeat timer

Also fixed an issue where the session may have been closed by the time
the message handler is added by moving the code that add the handler
in Endpoint.onOpen implementation.