Get rid of hard-coded ports in tests
Get rid of hard-coded ports in tests

Dynamically allocate ports for test listeners to avoid possible
collisions with local services. Set up and tear down listener for each
test.

xtaci/smux