Refactor the test case to support listen custom DNS/HTTP port. Avoid binding system restricted port (<1024). Bug: 322113686 Test: atest NetworkStackIntegrationTests:android.net.NetworkStatsIntegrationTest Change-Id: I5d3b966cdadc9321ca2ee0d04a5b8f71ee79bd8a