DNSResolver: fix crash when networking is disabled and not needed

This commit fixes the issue when "localhost" is tried to be resolved
where it used to fail when networking on Mac OSX is disabled. When it's
disabled, the file /etc/resolv.conf doesn't exist and thus the method
Celluloid::IO::DNSResolver.nameservers returns nil, which shouldn't be a
problem because networking isn't really needed to resolve "localhost".
It can use static lookup with /etc/hosts.
restore caching and old complexity of #resolve
Merge pull request #116 from paddor/master

DNSResolver: fix crash when networking is disabled and not needed