CLI: unify, streamline, and refactor listener code
Right now we have two kinds of listeners: DNS and SOCKS. We should consider simplifying the logic that creates them a lot.
Some goals are:
-
Eliminate duplicate code. -
Allow multiple listener ports of the same type. -
Allow listening on non-localhost addresses -
Fail with an error if the port binding fails for some reason other than "we don't support that address family."