Add scan-by-hostname

Hijack DNS resolution into the case where an IP address passed to
init_by_string fails to be an IP. Ugly, but it works and is probably the
cleanest solution short of doing a major refactoring.