Made the TestCustomHandler test completely self-contained.
Used a helper class rather than an attribute on the TestCase class.
pep8
Fixed the name of the test method.
Added the _remove_endpoint method.
Made endpoints have themselves removed from their containing Deproxy objects when the shutdown method is called.
Added the shutdown_all_endpoints method.
Cleaned up imports.
Made the shutdown method also wait on the endpoint's thread to finish.
Shutdown the socket too.
Added tests for shutting down endpoints.