Refactor git_cache to use an rwlock

This is super low-hanging fruit to reduce contention when many threads are trying to read from the cache simultaneously.

Before this change, 10–20 threads hitting the cache hard resulted in a trace where literally _tens_ of seconds (not to be confused with milliseconds) were being spent in `git_cache_get`. It's now a rounding error.

/cc @arrbee