This uses the metalog to keep track of exactly what is being added in
each image and makes it possible to share the layers instead of
squashing them together in each image.
This is close to being able to support unprivileged building of OCI
images, currently blocked by pkg requiring root privileges for
installing packages, even if the metalog is enabled.
MFC after: 1 day