bpo-34246: Make sure test_smtplib always cleans resources when finished (GH-9108)

* Make sure that when some of the tests in test_smtplib fail, the allocated threads
and sockets are not leaked. 

* Use support.join_thread() instead of thread.join() to avoid infinite blocks.
1 file changed