Mirror writes to database: Link layers and Repositories during manifest PUTs

Context

With #75 (closed) it was determined that an explicit relationship between layers and repositories needs to be maintained. !194 (merged) creates the relationship in the schema.

Rationale

Currently, we're not linking layers to the repository via API operations, only on import !195 (merged), so we'll need to add them to the manifest PUT logic for schema2 and schema1 manifests to record this relationship for new layers.

Edited by Hayley Swimelar