Fix use after free in memory only backend.

Writing to a sparse entry could result that entry being evicted while
the write was still in progress. This fix considers sparse entries in
use if any of their children are in use; this can drive up memory use
but avoids tickling the dragon by expanding the hand rolled
refcounting implementation in the in memory cache.

R=mmenke@chromium.org
BUG=589186

Review URL: https://codereview.chromium.org/1725363005

Cr-Commit-Position: refs/heads/master@{#377598}
2 files changed