chore(cache): counter cache storage using Redis

Context

This is related to Download counter for container images (&14021) and proposed implementation plan.

Problem

The registry needs to store the number of times a container repository has been downloaded.

Proposal

Use Redis to stage bursts of increments (async, after dispatching the API response, likely with a new repository statistics middleware) and periodically flush the counter value to the database (also async). This gives us the best possible performance, scalability and reliability.

Notes:

Edited by Jaime Martinez