Reporting: Refactor ReportingCache's storage of clients and endpoints

See https://docs.google.com/document/d/19vDLCRVP-WvWxA_YNZfhkkW6fS5A2Ea9ulJ8i8AcPAM/edit?usp=sharing
for details.

This CL refactors the client side of the ReportingCacheImpl. Clients,
endpoint groups, and endpoints are now represented by separate structs.
The cache stores each in separate maps. Endpoints are evicted if an
origin exceeds the per-origin endpoint limit, or if the cache exceeds
the global endpoint limit.

This fixes an incorrect assumption made by the previous implementation
that a given endpoint URL cannot be in multiple groups for the same
origin.

Bug: 912951
Change-Id: I0c548c3cf20ac57a9f17482300dd9a57a14e53b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1453109
Commit-Queue: Lily Chen <[email protected]>
Reviewed-by: Joshua Bell <[email protected]>
Reviewed-by: Eric Orth <[email protected]>
Cr-Commit-Position: refs/heads/master@{#652467}
29 files changed