repo: Add support for v2 repo
v2 repo deprecate totally the digest file.
The digest file is currently still created even if pkg doesn't use it as it
uses the 'sum' entry in the packagesite.yaml file.
While here fix a bug when providing a repo meta file (with --meta-file) which result
of the default meta settings being used.
v1 repo is still the default for now as pkg will need to learn to accept v2 version.
When creating a repo v2 on top of a repo v2, unlink the digest.txz file.
Force the repo test to create a v1 repo as it checks the digest file.
Add a new test for v2 repo that currently just check that the digest file isn't created.
Signed-off-by: Emmanuel Vadot <manu at freebsd.org>