Fix: fix localhost resolution address

Every DNS resolving call now will query the local host table (usually
/etc/hosts) before trying through Tor. Thus this fixes the issue of
localhost resolution.

If the application tries to connect to localhost, it is refused since it
might be a TCP DNS query to a local DNS server.

Adds a test for localhost resolution with getaddrinfo().

Fixes #14

Signed-off-by: David Goulet <dgoulet@ev0ke.net>