Check that public hostname can be resolved before stopping IaaS poll

This is a workaround for OpenStack, which returns the local hostname as
the public hostname for some time during the launch, even though the
instance is running. If this hostname cannot be resolved, we continue
polling IaaS until we get a resolvable hostname.