[Extensions] Clean up the handling of ExtensionHostMsg_Request

ExtensionHostMsg_Request is sent when an extension calls an API function. Before
this patch, this IPC would be sent to one of 11 different call sites, all of
which then routed it to the ExtensionFunctionDispatcher - and all of which
have to implement ExtensionFunctionDispatcher::Delegate.

Instead, have ExtensionWebContentsObserver handle the IPC, since it is created
(or should be) for all extension web contents. This also lets us eliminate many
(though not all) of the ExtensionFunctionDispatcher::Delegate implementations
(I will try to clean more up in a later patch).

The size of this patch is due to a number of yaks that needed shaving along the
way - in particular, around GuestView.

BUG=498017
BUG=405246

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

Cr-Commit-Position: refs/heads/master@{#333843}
diff --git a/extensions/browser/extension_function.cc b/extensions/browser/extension_function.cc
index f7c7097..624bfe78 100644
--- a/extensions/browser/extension_function.cc
+++ b/extensions/browser/extension_function.cc
@@ -464,7 +464,7 @@
 content::WebContents* UIThreadExtensionFunction::GetAssociatedWebContents() {
   content::WebContents* web_contents = NULL;
   if (dispatcher())
-    web_contents = dispatcher()->delegate()->GetAssociatedWebContents();
+    web_contents = dispatcher()->GetAssociatedWebContents();
 
   return web_contents;
 }