fix: skip adding labels to images for local-use commands (run/predict/serve/train) (#2787)
When running cog run, cog predict, cog serve, or cog train, the build
was unnecessarily adding Cog metadata labels to the image. This added
overhead (pip freeze, git info, base image layer inspection, extra
Docker build step) for images that are only used locally and never
distributed.
This was a regression introduced in 1525f7f8 which replaced
resolver.BuildBase() (no labels) with resolver.Build() (adds labels)
for the serve/run/predict/train code paths.
Adds a SkipLabels option to BuildOptions that short-circuits the
label-adding phase in image.Build() when set.