[3.10] bpo-45212: Fix dangling threads in skipped tests in test_socket (GH-28361) (GH-28409)

tearDown() is not called if setUp() raises an exception
(including SkipTest). addCleanup() should be used for guaranteed
execution of the cleanup code.
(cherry picked from commit 7dacb70485a0910eb298c24b4d051720ca56fb91)
1 file changed