No-op refactoring of NetworkAgentTest

This is a no-op refactoring of NetworkAgentTest, which makes
the create*NetworkAgent helper functions easier to use, this
includes:
  1. Rename "name" field to specifier, since it is the only
     purpose of that field.
  2. Make the callback generated with agent dedicated to the
     agent by adding specifier to support multiple agent cases.
  3. Refactor some code flow to for readability and less
     duplicated code.

Test: atest CtsNetTestCases:android.net.cts.NetworkAgentTest \
      --rerun-until-failure 100
Test: atest CtsNetTestCasesLatestSdk:android.net.cts.NetworkAgentTest
      on R device
Bug: 188657173
Merged-In: Id7948d218b78ae0abf253ca8925e787362ac463f
Change-Id: Id7948d218b78ae0abf253ca8925e787362ac463f
  (cherry-picked from aosp/1727823)
1 file changed