bpo-42251: Add gettrace and getprofile to threading (GH-23125)

This allows to retrieve the functions that were set in these two, which might differ from sys.gettrace and sys.getprofile within a thread.
5 files changed