Refine validation metrics

Rename members for a clearer API, and add try/catch blocks to each
NetworkMonitor call to guarantee there will not be any crash.

Add a flag allowing to disable all the metrics collection code.

Bug: 151796056
Test: atest NetworkStackTests (see also test-only change)
(clean cherry-pick from internal branch)
Merged-In: I06d6dccc57146b955b15cf36a2109c68a5355494

Change-Id: I06d6dccc57146b955b15cf36a2109c68a5355494
4 files changed