[Commtest] extract code to create a socket session with Tunnelbroker
Summary: Minor cleanup, putting duplicated code in one place - helps me with testing.
Test Plan:
- Run Identity
- Run Tunnelbroker
- Go to commtest/
- Run:
cargo test --test identity_tunnelbroker_tests -- --nocapture
- Run:
cargo test --test tunnelbroker_integration_test -- --nocapture
Reviewers: michal, bartek, varun, jon
Reviewed By: michal, bartek
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D9310