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.
Do you think it would be worthwhile making the mock objects have names? Are they likely to be useful re-usable things? I actually don't understand why onceClosed is set here...? I don't see it used in this test... :/