release: Fail the build if pkg can't be installed
If we can't install pkg(8) on the media, instead of ignoring the error,
fail the build. This avoids silently creating media which doesn't have
pkg(8) on, and therefore can't be used for a pkgbase install.
Installing pkg(8) can still be entirely disabled by setting NOPKG.
MFC after: 1 day
Reviewed by: ifreund_freebsdfoundation.org, cperciva
Differential Revision: https://reviews.freebsd.org/D52635
(cherry picked from commit 8654315ae8d368ce47232bde1f2593e256224e56)