[Thread] support polling IPv4 packets in integration test

This CL also refactors the IntegratoinTestUtils a bit to make it more
reusable.

Bug: 356770473
Test: CI

Change-Id: Ief94e312e06e4b62c71284c8ff0ef710f0b632fb
3 files changed