Extract TCP test utilities into netlib.test
Streamline netlib.test API