Use preferred protocol first when resolving hostname (#728)
* Use preferred protocol first when resolving hostname
Prior to this change, LookupIPAddr() is used to do the DNS query,
which sends two DNS queries for A/AAAA records, even if the config has
preferred protocol set to ip4 and does not allow fallback protocol.
This change will change to use LookupIP() with the preferred protocol,
and only try fallback protocol if it's set to true. In most cases doing
this will save one RTT of DNS query.
Signed-off-by: Yuchen Ying <github.com@yegle.net>