[Tunnelbroker] Refactor connection lifetimes into session object
Summary:
For better encapsulation around connection events
(e.g. device being authenticated and identified), moved
more of the connection logic into the session object.
Also, refine how connections are handled so they are properly
deregistered once a client closes a connection.
Depends on D7799
Test Plan:
nix develop # init localstack and run terraform comm-dev services start (cd services/terraform && ./run.sh) (cd services/tunnelbroker && cargo run &) (cd services/commtest && cargo test --test tunnelbroker_integration_test) # Previously, running the suite twice would fail (cd services/commtest && cargo test --test tunnelbroker_integration_test)
Reviewers: bartek, varun
Reviewed By: bartek, varun
Subscribers: ashoat, tomek, atul
Differential Revision: https://phab.comm.dev/D7800