Refactor socks package. Add support for socks4/4a.

Related to #2567 
This change is backward incompatible. 
Fully qualified import. It's PITA that IntelliJ always does this when refactoring, but we need to be careful to fix this manually.