Add MinOccurrences cache middleware
This adds a new streamcache middleware called MinOccurrences. Its purpose is to only forward requests to the inner cache for keys that have been seen a minimum number of times.
The goal is to reduce the write workload caused by the pack-objects cache. At first we will only validate this on GitLab.com.
At this stage the only way to enable the min occurrences logic is to set an environment variable GITALY_PACK_OBJECTS_CACHE_MIN_OCCURRENCES. This is not the final configuration mechanism, we are doing this so we can get quicker feedback in production.
Edited by Jacob Vosmaer