Add test for the NetworkTraceHandler

This tests the logic of converting bpf PacketTraces into Perfetto
TracePackets. The test stands up an in-process trace and parses the
resulting trace output (filtering to only the events we care about).

On the implementation side, `Write` is added as a non-static method
to do the conversion from a batch of PacketTraces. Because this becomes
part of the instance, per-instance configuration (e.g. interning) can be
applied without causing conflicts between concurrent sessions.

Bug: 246985031
Test: atest libnetworkstats_test
Change-Id: I15a26ba720eff308d01e6827a176a6b2f7c60e80
4 files changed