Simple multi-url support for mojo apps.

This patch makes it so that querystrings are no longer considered part of a mojo application's identity.

So if you connect to http://a?foo, then http://a?bar, you'll end up talking to the same application, just two different connections.

The URL of each connection is sent to the app via a new param in AcceptConnection().

This patch also adds some app tests that exercise http app loading, which wasn't tested before.

R=qsr@chromium.org

Review URL: https://codereview.chromium.org/943053003
diff --git a/shell/application_manager/application_manager.h b/shell/application_manager/application_manager.h
index 9e3da2d..cce6089 100644
--- a/shell/application_manager/application_manager.h
+++ b/shell/application_manager/application_manager.h
@@ -150,7 +150,7 @@
   typedef std::map<GURL, std::vector<std::string>> URLToArgsMap;
   typedef std::map<std::string, GURL> MimeTypeToURLMap;
 
-  bool ConnectToRunningApplication(const GURL& application_url,
+  bool ConnectToRunningApplication(const GURL& resolved_url,
                                    const GURL& requestor_url,
                                    InterfaceRequest<ServiceProvider>* services,
                                    ServiceProviderPtr* exposed_services);
@@ -164,7 +164,11 @@
       ApplicationLoader* loader);
 
   InterfaceRequest<Application> RegisterShell(
-      const GURL& requested_url,
+      // The original URL requested by client, before any resolution or
+      // redirects.
+      // This is mostly useless and should be removed.
+      const GURL& original_url,
+      // The URL after resolution and redirects, including the querystring.
       const GURL& resolved_url,
       const GURL& requestor_url,
       InterfaceRequest<ServiceProvider> services,
@@ -173,7 +177,7 @@
   ShellImpl* GetShellImpl(const GURL& url);
 
   void ConnectToClient(ShellImpl* shell_impl,
-                       const GURL& url,
+                       const GURL& resolved_url,
                        const GURL& requestor_url,
                        InterfaceRequest<ServiceProvider> services,
                        ServiceProviderPtr exposed_services);