Fallback to resolving localhost when interface searches fail
As described in legacy/trac#17949 (moved) & legacy/trac#17901 (moved), tor needs to know the loopback address.
We can fall back to resolving localhost on systems that don't return any loopback addresses when their interfaces are enumerated.
We need to check that the returned values are standard 127/8 or [::1]. This allows tor to work on non-127.0.0.1 loopback IPv4 systems, and IPv6-only systems, without the security issues inherent in trusting a possibly non-local resolver.