Add interning support to NetworkTracing

Interning is a feature Perfetto offers. You can store details in the
intern table and associate it with an id. Then, each trace packet can
reference just the id rather than the full proto contents. In our case,
we already identify unique contexts, so all we need to do is give them
unique IDs and record that instead.

Bug: 246985031
Test: atest libnetworkstats_test
Change-Id: I84f7673bc41b89390c02b8ec5460adfadbb36173
3 files changed