Properly clean up network resources after test has run.

Needed in order to be able to run all tests together without incurring socket bind exception to due "port already in use".