Turn InMemoryURLIndex into a KeyedService

In order to remove the dependency of HistoryService on InMemoryURLIndex, turn
it into a KeyedService whose factory has a dependency on HistoryServiceFactory
and add the correct dependency so that it is initialized when creating the
HistoryQuickProvider.

Remove unused feature to override the InMemoryURLIndex in HistoryQuickProvider.

BUG=138321,465679

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

Cr-Commit-Position: refs/heads/master@{#320259}
diff --git a/chrome/browser/autocomplete/autocomplete_classifier_factory.cc b/chrome/browser/autocomplete/autocomplete_classifier_factory.cc
index 4fb0336..28c760166 100644
--- a/chrome/browser/autocomplete/autocomplete_classifier_factory.cc
+++ b/chrome/browser/autocomplete/autocomplete_classifier_factory.cc
@@ -7,6 +7,7 @@
 #include "chrome/browser/autocomplete/autocomplete_classifier.h"
 #include "chrome/browser/autocomplete/autocomplete_controller.h"
 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h"
+#include "chrome/browser/autocomplete/in_memory_url_index_factory.h"
 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h"
 #include "chrome/browser/profiles/incognito_helpers.h"
 #include "chrome/browser/profiles/profile.h"
@@ -54,6 +55,7 @@
   // TODO(pkasting): Uncomment these once they exist.
   //   DependsOn(PrefServiceFactory::GetInstance());
   DependsOn(ShortcutsBackendFactory::GetInstance());
+  DependsOn(InMemoryURLIndexFactory::GetInstance());
 }
 
 AutocompleteClassifierFactory::~AutocompleteClassifierFactory() {