Switched from obsolete gethostbyname() to getaddrinfo()

Neat side-effect: IPv6 is now supported as well.
Updated tests for both IPv4 and IPv6 testing.

Your hosts file should list ip6-localhost as "::1" for the tests to work
correctly. This problem may be solved by modifying the parser in a way that it also accepts
addresses like "[::1]".

Shed is only tested using IPv4, warp is tested using both protocols.