The session ids contain a Gorilla SecureCookie which internally encodes
"timestamp|value". As a result, newer session ids compare "greater"
than older ids. This is a problem for conferences where the participants
decide based on comparison of the session id who calls who, so later
participants always have to call all of the existing participants.
With this change, the (random) value is at the start of the session id,
resulting in "random" ordering of participants. Also some tests have
been added to check session en-/decoding.
In addition to adding unit tests for the "Hello" message,
the following notable improvements are included:
* Separate websocket callbacks from the hub via a handler API
and adaptor.
* Move all application specific state to the session.
* Session no longer refers to the hub.
* Remove redundant MessageRequest struct.
* Hub is no longer responsible for buffer pool or
buddy image management.
* Consolidated connection table locking in the hub.
* Remove redundant session table from the hub.
* Split room join and leave into separate handlers.
This also removes the RoomConnectionUpdate struct.
* Entirely remove room management from the hub.
This also provides room operations with a separate mutex.
* Split stats into a separate service.
* Simplify the session token handler.
* Buddy image HTTP handler no longer takes the entire hub.
* Centralize JSON encoding and decoding. This removes JSON
encoding from the room worker queue.
* Improve unicast message statistics.
* Numerous other renamings and cleanup items.