Added logging (python logging module) and replace sleeps with port polling

Note I also removed what appeared to be a superfluous environment.start()/stop() from the example test case which was orphaning a traffic_server process on every test run.