Don't hardcode Ruby connection to IPv4

This fixes #393, thanks to @MarkMartinec.
Use all results returned by getaddrinfo(3), if necessary

I have seen getaddrinfo(3) return IPv6 addresses before IPv4 addresses
when a hostname resolves to both. It is still more common for Redis to
listen only on a v4 address than a v6 address or both a v4 and a v6
address. When getaddrinfo(3) would returns a v6 address that Redis is
not listening on, the user would see ECONNREFUSED or similar without
this patch. This is clearly undesirable behavior.

Additionally, per the getaddrinfo(3) man page, we should try to use the
addresses it returns in the order they are returned.
Add test for resolving a host to an address

The IPv6 change in b146d74 made a bunch of tests fail because they could
not connect to 'localhost'. They could not connect because only the
first result from getaddrinfo(3) was used, which happened to be the IPv6
localhost address. This commit changes those tests to use 127.0.0.1 and
adds a test that explicitly tests that the client can resolve localhost.
Add tests for connecting to IPv4 and IPv6
Only run IPv4/IPv6 tests for the Ruby driver

EventMachine doesn't appear to support IPv6, nor does hiredis.
Add comment about AI_ADDRCONFIG
Merge branch 'master' into ipv6

Conflicts:
	test/internals_test.rb
Merge pull request #394 from redis/ipv6

Don't hardcode Ruby connection to IPv4