Improve code handling SOCKS connection in tor daemon
After a discussion at the weekly little-t tor meeting on #tor-dev, it appears that the code handling SOCKS4/5 connections is a mess:
15:41 < nickm> sad to say, the SOCKS code is a mess right now. It'll probably need significant testing and refactoring before we can think about extending it
Considering proposal 229 to extend SOCKS5 for Tor use cases, we should work on improving this code base before anything else.
- Tests, tests and moar tests