Make GrResourceCache dynamically change between LRU and random replacement strategies.

Random performs significantly better when each frame exceeds the budget by a small margin whereas LRU has worst case behavior.

The decision of which to use is made based on the history from a few frames of the ratio of total unique key cache misses to unique key cache misses of resources purged in the last 2 frames.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2321563006

Review-Url: https://codereview.chromium.org/2321563006
5 files changed