Store cache statistics on level 2 and cache bookkeeping still on level 1
In a “mostly cache hits” scenario, many parallel ccache invocations may
want to update statistics at the same time. Spreading out counter
updates over 256 instead of 16 stats files reduces lock contention
significantly.
Keeping cache bookkeeping (i.e. cache size and files counters) on level
1 preserves backward compatibility with the cleanup algorithm in older
ccache versions.
Some counters displayed by “ccache -s” won’t be accurate when an older
ccache version is run on a cache directory that is also used by ccache
4.x, but that shouldn’t be much of a problem in practice. Also, the
cache statistics isn’t backward compatible anyway since new counters may
be introduced and they will be invisible to older versions.
Closes #168 (only statistics are moved to the second level, though).