bpo-37526: Add support.catch_threading_exception() (GH-14664) (GH-14666)

Context manager catching threading.Thread exception using
threading.excepthook.
(cherry picked from commit 91b4f7ab7f9a5e0908b91379ee085ae087a76483)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
3 files changed