fix: gracefully handle missing manifest revisions during imports
Context
Related to gitlab#350920 (closed), found in gitlab#350920 (comment 915731943).
Problem
We found out that on rare occasions (at the time of writing, we've imported close to 1k repositories and this error only occurred in 3), a manifest may exist on the old code path and be tagged in a given repository but have no corresponding revision (an entry under _manifests/revisions/) in such repository. This is likely due to a past or unknown bug related with writes of metadata to the storage backend.
When such occurs, the manifest service will throw a "manifest unknown" error. This error will then prevent the (pre)import for the corresponding repository.
Sample logs: https://log.gprd.gitlab.net/goto/ee2d2660-bfcd-11ec-b73f-692cc1ae8214
Solution
If attempting to pull such manifests from the API (on the old code path), either by tag or digest, the result will be a 404 Not Found. This is because the manifest service is bound to always validate the presence of the manifest revision and raise a distribution.ErrManifestUnknownRevision if not present. So for the outside and end-users, it is as if these manifests didn't exist at all.
This MR fixes the Importer so that it catches this error, logs a warning message, and skips the import of such inaccessible manifests.
Tests to assert the current (wrong) behavior: 04b7e639. These fail without the fix: https://gitlab.com/gitlab-org/container-registry/-/jobs/2349187290#L2103