[M152] [ganesh] Drop unique refs in GrThreadSafeCache when flush tasks fail

Original change's description:
> [ganesh] Drop unique refs in GrThreadSafeCache when flush tasks fail
>
> If any render task fails to execute (or instantiation/preFlush fails),
> GrThreadSafeCache entries published ahead of rendering during the flush
> (such as lazy-view blur masks) may point to textures that were never
> initialized. Drop all uniquely-held entries in the thread-safe cache on
> failing flushes so subsequent draws do not consume uninitialized
> textures.
>
> Bug: 561987051
> Fixed: 561987051
> Change-Id: Idff93c3c7ab6480c56f727831d04f7202204c0fd
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1368937
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

(cherry picked from commit 409081ee128bce31d6b7cfa1dadab4a0750cdcc0)

Bug: 566046883,561987051,561987051
Change-Id: Idff93c3c7ab6480c56f727831d04f7202204c0fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1373337
Auto-Submit: Chrome Cherry Picker <chrome-cherry-picker@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
2 files changed