[isolated] fix cache race condition
[isolated] fix cache race condition

When `isolated download` downloads many duplicated files simultaneously,
it sometimes failed for adding a cache for race condition.

This CL aborts the cache write operation when it detects the cache existence in the mutex section.

Fixed: 1185387
Change-Id: Ie4224ef2fcc3c042af18f5d951c4677a735ca8ca
Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/2755351
Auto-Submit: Junji Watanabe <aaef61ef98ffea505db831f310be2a0eb8492537@google.com>
Reviewed-by: Takuto Ikuta <71927f930fca81015e0f496c65cd126ab1a692e3@chromium.org>
Commit-Queue: Junji Watanabe <aaef61ef98ffea505db831f310be2a0eb8492537@google.com>

luci/luci-go,luci/luci-go,luci/luci-go,luci/luci-go,luci/luci-go,luci/luci-go