Allow the ExternalCache's backend to be fast-forwarded and shut down
This CL makes three improvements to the ExternalCache:
1) Add a Shutdown() method that will invoke a callback when the cache has
been shut down completely and there is no more pending file I/O.
2) Move the loop that polls for cache readiness from the blocking pool to
the UI thread. This allows the loop to be interrupted when the cache is
shut down.
3) Use a SequencedTaskRunner passed to the constructor for all file I/O.
This allows for fast-forwarding and waiting until all file I/O tasks
have completed in tests.
BUG=287802
TEST=Manual
Review URL: https://codereview.chromium.org/
24276007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226192 0039d316-1c4b-4281-b951-d872f2087c98