Reimplement host lookup again

WinSock doesn't implement inet_aton, so further abstraction is needed.