Quit NetworkMonitor threads in integration tests

Similarly to NetworkMonitorTest, terminate NetworkMonitor threads and
ExecutorServices after each test case in integration tests.

This should fix flakes where the HTTP probe from testValidation could
finish after mock probe responses are cleared in tearDown.

The utils used in NetworkMonitorTest are factored out to ConcurrentUtils
to achieve that.

Fixes: 292481238
Test: atest --rerun-until-failure 50
Change-Id: I5cdeee8d4f06ea40e338dd2cb1fdcc2fe0907a7d
3 files changed