create metadata layer for registry images

This PR will try to create a metadata layer when no `latest` tag exists. If retrieving `latest` fails (i.e. no build was created before this release was published), we will attempt to create a `v0` layer that acts as an empty placeholder for metadata. The initial config will still result as `v2` on the registry. The code will still throw a `RuntimeError` if the registry is unreachable, as it tries to retrieve the `latest` tag again in the exception block.

fixes #542