Add the ability to setup the nameserver via pkg.conf or env

That allows to install in a jail without resolv.conf for example:
NAMESERVER="8.8.8.8" pkg -j myjail install something