Do not send repeated Expect-CT reports to the same host+port

To avoid duplicate reports, this CL adds an ExpiringCache, keyed by
request hostname+port, to not send repeated Expect-CT reports.

As noted in a comment, it's possible that the same host+port could generate
legitimately different Expect-CT reports and it could be useful for the server
operator to receive both of them. However, this seems unlikely to happen in
practice. In a future refactor in which we move the Expect-CT reporting code
into //net, it would be easier to use more of the report contents as the cache
key (so that meaningfully different reports would not share a cache key), but
keying by host+port should suffice for now.

BUG=679012

Review-Url: https://codereview.chromium.org/2901183002
Cr-Commit-Position: refs/heads/master@{#474927}
4 files changed