CookieMonster: Don't load entire cookie jar on SetCanonicalCookieAsync

Before this change, the SQLite store and the cookie
monster had different notions of how exactly |key| passed to
PersistentStore::LoadCookiesForKey should be computed[1], and the
version used by CookieMonster was not really computable from a
CanonicalCookie.  This changes both of these to use
CookieMonster::GetKey, which is already used with both
CanonicalCookie's and URLs, and can therefore be easily called from
SetCanonicalCookieAsync as well.

[1] In particular they disagreed on chrome-extension:// cookies, but
that appeared to have been deterministically masked by implementation
details of the SQLite cookie store, so doesn't seem to have been a bug
that actually affected our users.

Bug: 813141
Change-Id: Iaa3840a1e1e28992c99413142a62fddff97c7f78
Reviewed-on: https://chromium-review.googlesource.com/940141
Commit-Queue: Maks Orlovich <[email protected]>
Reviewed-by: Victor Costan <[email protected]>
Reviewed-by: Matt Menke <[email protected]>
Cr-Commit-Position: refs/heads/master@{#541036}
5 files changed