Report deleted and skipped cache entriesThis commit introduces `CleanupProgressMonitor` and a default`ProgressLogger`-based implementation that tracks the total number ofdeleted and skipped cache entries. `CleanupAction.clean()` now takes amonitor as an additional argument. `DefaultPersistentDirectoryStore`creates the default implementation and passes it to its `CleanupAction`.
Delete access times for deleted files from journalWhen a file is deleted by the LeastRecentlyUsedCacheCleanup action, thecorresponding entry is now removed from the used FileAccessTimeJournalin order to avoid storing obsolete entries that would never get removed.
Use separate cache for file access time journalStoring a file access time journal inside each cache causes a lot ofcontention in particular with caches that require a lot of exclusiveaccess like the artifact cache.Instead, a new `journal-1` cache that is managed by a user-home-scopedservice is now used to keep track of file access times for all cachesthat want to use it.
Enable incremental cache cleanupInstead of computing the complete list of eligible files at once,SingleDepthFileFinder now returns an Iterable that creates anIterator that will incrementally walk the file tree.In addition, the CleanupAction.clean() operation now takes aCountdownTimer and implementations periodically check whether the timerhas expired. If so, the current cleanup will be aborted.DefaultPersistentDirectoryCache now uses a timeout of 20 seconds whichis well below the file locking timeout of 60 seconds.The marker file (gc.properties) will only be updated if the completecleanup was able to finish without expiring the timeout.
Write access time asynchronously, read synchronouslyFile access times are now written asynchronously while the cache isbeing used. When it's about to be closed, they are now readsynchronously from the cleanup action because the cache access workerhas then already been stopped.
Track artifact cache file access in PersistentIndexedCacheThis commit introduces the `FileAccessJournal` interface and providestwo implementations: ModificationTimeFileAccessJournal:: Reads and sets `File.lastModified()`. IndexedCacheBackedFileAccessJournal:: Uses a PersistentIndexedCache to store the access timestamp.The latter is now used in DefaultCacheLockingManager for the artifactcache. All other PersistentCaches still use the former.