[Thread] leverage the TestableNetworkAgent to simplify the setup of test network

Some previous setup steps were implemented in NsdManager test cases
hence we couldn't reuse them in Thread test cases. aosp/3377549
introduced more methods in TestableNetworkAgent class which we could use
to get unify the behavior and reduce redundant code.

Not sure if this can deflake the integration test cases.

Bug: 338061061

Change-Id: I6b4542505ec80bf06b736fecbbe7d6901d27cbc4
1 file changed