This commit rewrites proxymux package to provide following functions:
+ proxymux.ListenSOCKS(address string)
+ proxymux.ListenHTTP(address string)
both are drop-in replacements for net.Listen("tcp", address)
The above functions can be called with the same address to take
advantage of the mux feature.
Tests are not included, but we will have them very soon.
This commit should be in PR #1006, but I ended up with it in a separate
branch here. Please rebase if you want to merge it.