Add BPF helper function for system server

Add the map iterate and stats reading helper function used by system
server into libbpf. The methods are used by both NetworkStatsService and
NetworkStatsFactory JNI library.

Delete the function that scan through cookieTagMap and delete the stats
entry that belongs to a not existing tag. This function is handed over
to system server since system server can hold a lock to prevent
processes to access bpf maps when deleting the map entries.

Bug: 30950746
Test: run cts -m CtsNetTestCases -t android.net.cts.TrafficStatsTest
Change-Id: Ie08c817d709f0ea32405989816bd6a016ebc6bf1
9 files changed