API: Log Unknown Layer Blob Media Types

Context

Before starting work on API: Handle Blob Media Types Consistently (#990 - closed) we should log any unknown layer media types to ensure that there are no common currently unknown media types used for layer blobs. If we do encounter such media types, we should add them to the registry media types table to ensure that rolling out API: Handle Blob Media Types Consistently (#990 - closed) does not cause previously accepted layer media types to be rejected.

Solution

We have access to the actual media types on the manifest JSON here we should be able to compare those with the types contained in the database. We'll need to create a new, but simple, query against the media_types table to check the media type against the ones contained within that table.

Edited by Hayley Swimelar