Issue #7449, part 7: simplify threading detection in test_capi

 * Skip TestPendingCalls if threading module is missing
 * Test if threading module is present or not, instead of test the presence of
   _testcapi._test_thread_state
1 file changed