This allows pkg(7) to be used to bootstrap a chroot or jail, and to
recognize the -j and -r options and pass them through to pkg(8) if
already bootstrapped.
The -j option greatly complicates the option-parsing loop because we
can no longer pass our original argv unmodified to pkg(8); specifcially,
we must strip -j and its argument, which in practice means constructing
a whole new argv with the options we wish to pass on.
Note that this does not address the issue of repository keys. If using
a signed package repository, you will still need to copy /usr/share/keys
into the target environment before or after bootstrapping, or pkg will
be unable to verify package signatures.
MFC after: 1 week