Added `CacheAccess.withFileLock()` to allow an action to run while the current process is holding the lock for a cache, as an alternative and eventual replacement for `useCache()` which also blocks all other threads for the current process and other processes.

Apply concurrency control to the artifact transform output cache, so that no more than one thread in any build process attempts to produce a particular output at any given time. Different outputs can be produced concurrently by a single build process, but currently not by multiple build processes at the same time.

Added `PersistentIndexedCache.get(key, producer)` overload, allowing the production of an entry if it is not present. Handles multiple threads attempting to produce the same entry, including threads in other build processes.