Ensure sockets are properly closed on object destruction

Fix issue @tardyp reported on #239


We have not been able to reproduce on a simple testcase. We can only make it happen on our complex environment; involving buildbot, twisted and txrequests.

This fix no longer exhibits the issue. Please, give us a feedback whether this solutions is correct.