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.
Ah, good catch. I did rename `stop` to `close`.

I really don't like maintaining these .d.ts files :-/