Move socks and logger into separate modules, add support for SOCKS4/SOCKS4a