Add a function for parsing /etc/hosts

This will be important for dnsmasq, but is a generic DNS utility