Add a method to override all the cookies in CookieMonster
This method is required in order to upstream CookieStoreIOS.
CookieStoreIOS can periodically synchronize the iOS system
cookie store (NSHTTPCookieStorage) to CookieMonster.
It is not possible to simply delete all the cookies and re-add
the new version of the cookies, because this can lead to cookie
loss if the application crashes right after deleting all cookies.
For this reason, this CL introduces a new SetAllCookies method
that computes the exact difference between the exiting cookies and
the new cookies, and does only the minimum of operations needed.
Review URL: https://codereview.chromium.org/
1000103002
Cr-Commit-Position: refs/heads/master@{#320954}