Cache the FreeBSD distfiles.

Relying on ftp.freebsd.org to be accessible was causing
too many build breaks.

Put the distfiles we need in /freenas-build/freebsd-distfiles
and use them as a cache if that exists.

use local caches for freebsd packages

However turn off PACKAGE CACHE for now, it doesn't work.

The code calls pkg in a chroot so the /freenas-build/*package* cache
directories are not there.  Maybe we can fix this with a loopback
server or nullfs mounts.

Also we need to fixup the url schema.
(cherry picked from commit 75ae68ed4fba90bc685b74061d341a6afd7b3f95)