Resolve localhost to 127.0.0.1 without using DNS

Signed-off-by: Andrei Dinin <adinin@pivotal.io>
do we want to just return here? also add a test that checks that we do not try to resolve it for localhost case.