Migrate ValueStoreFrontend to TaskScheduler API

This migrates value_store_frontend.cc and related unit test code from
browser FILE thread to the singleton SequencedTaskRunner used by the
rest of extensions store code. I hope that this should fix crbug/746155
which I think could be caused by accessing the store backend from two
concurrent threads.

One tricky part of the change is getting rid of the test code in
rules_registry_with_cache_unittest.cc that the ValueStore is lazily
created when reading/writing. This change didn't change anything
about how the ValueStore is created but I think the original assumption
was wrong and happened to work only because there wasn't a true
multi-threading. The FILE browser thread was actually mapped to the same
physical thread so the store wasn't created until spinning the RunLoop.
In fact it seems the store creation is being initiated in the test
SetUp, and now with the true backend thread that finishes before the test
body starts running.

BUG=746155, 689520

Change-Id: Ida6b2bd6ca5cb4ed32fc7d70d2f949bca6085bb3
Reviewed-on: https://chromium-review.googlesource.com/578692
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Commit-Queue: Stanislav Chiknavaryan <stanisc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489136}
3 files changed