endpoint: Use daemon IPcache prefixes tracker
endpoint: Use daemon IPcache prefixes tracker

The previous implementation here would ensure that IPcache lookups for
this endpoint would only count the CIDR prefixes used by policies for
the current endpoint. Technically this is more optimal if various
endpoints have a range of CIDR policies with different prefix lengths,
as endpoints with no CIDR policies would have a small number of IPcache
lookups to implement an LPM in the eBPF datapath. However, this not
necessary for correctness and it forces us to maintain a chunk of
additional code which also slows down policy processing & calculation.

The daemon has tracked CIDR prefix lengths in use in the daemon since
commit 3096bda65030 ("daemon: Track prefix lengths in use in policy"),
so we can switch to that implementation. This removes the last user of
the 'CIDRPolicy' structure. The following commit will then remove it.

Users on Linux 4.9.x could plausibly see an increase in complexity in
programs in the datapath and hence a small performance decrease when
contacting destinations outside the cluster. No-one has complained about
this before and 4.9.x is becoming less and less common, so the impact is
expected to be low. Users could mitigate this by either upgrading their
kernel or reverting this pull request in their own builds of Cilium.

Signed-off-by: Joe Stringer <16a9a54ddf4259952e3c118c763138e83693d7fd@cilium.io>

michi-covalent/cilium,michi-covalent/cilium,cilium/cilium,cilium/cilium,cilium/cilium,cilium/cilium,michi-covalent/cilium,michi-covalent/cilium,cilium/cilium,michi-covalent/cilium