implement similar lifecycle for socks sessions as for socks server

Similar ideas to:
https://github.com/uProxy/uproxy-networking/pull/137

A SOCKS session lives as long as its TCP connection and datachannel.
We don't seem to be checking that onceStopped has fulfilled, but the test title makes it sound like we are checking for it... ?