Remove ExtensionHost dependency on Chrome's JavaScriptDialogManager

As part of the app_shell extensions project I am trying to move
ExtensionHost into src/extensions, but this means its dependencies
on Chrome must be broken.

* Use only a single instance of ChromeJavaScriptDialogManager instead
  of a "global" instance + one per extension
* Look up extensions when needed instead of caching an ExtensionHost
  pointer.
* Add a test-only delegate interface to AppModalDialogQueue so tests
  can wait until a dialog opens.
* Move JavaScriptDialogManager creation to ExtensionsBrowserClient.

BUG=321341
TEST=browser_tests LazyBackgroundPageApiTest.WaitForDialog
R=msw@chromium.org, yoz@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241054 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 241054