[DBSC] Implement CookieCraving for checking cookie presence

This adds a new class, CookieCraving, which subclasses CookieBase and
represents the requirement ("craving") for a matching real cookie (i.e.
CanonicalCookie instance).

It reuses code from CanonicalCookie, but it is conceptually different as
it does not represent a real instance of a cookie. Deviations from
CanonicalCookie logic are documented.

It will be used to implement the DBSC logic that decides whether to
defer a given request based on the presence or absence of a required
cookie.

Bug: 41495201
Change-Id: Iadef87d49e136d65e34efe076246c456f744fc66
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5463337
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: Lily Chen <chlily@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1291289}
NOKEYCHECK=True
GitOrigin-RevId: 7a2e22b1cecd32c73d6b3fab216eebfd39708262
4 files changed