[CacheStorage] Give cache directories unique names

The CacheStorage class creates a directory for each cache based off of
a hash of the cache's name. This is problematic in situations where a
cache is deleted and then recreated (but not yet wiped from
disk as javascript might be referencing it).

This CL gives every new cache a unique directory and stores the directory
mapping in the cache storage index protobuf. Legacy caches are moved to
new directories on CacheStorage initialization.

BUG=542668

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

Cr-Commit-Position: refs/heads/master@{#356055}
7 files changed