[AppCache] Move binding ownership to the profile-owned service.

This change fixes lifetime issues where the mojo service, created with
mojo::MakeStrongBinding, stayed alive after the Profile, AppCache
service, and things like the URLRequestContext have been destroyed.

This is a little scary, as the AppCacheDispatcherHost and general
AppCache code holds lots of raw pointers, and I'm sure this was the
cause of other strange bugs.

Prior to r522566 (when IPCs were converted to Mojo), the dispatcher
object was owned by the RenderProcessHostImpl, and created during
message filter creation. The filters were explicitly destroyed,
which made the lifetime deterministic.

Bug: 800391
Change-Id: Ie56839de3202be5c63080cf31e7a1391eb7ce405
Reviewed-on: https://chromium-review.googlesource.com/922919
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Commit-Queue: Daniel Murphy <dmurph@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#537144}(cherry picked from commit 00e3063ee402eecd68ee8d32634d9d490050d41d)
Reviewed-on: https://chromium-review.googlesource.com/927664
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/branch-heads/3325@{#519}
Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}
5 files changed