Add import_function method to test.test_support, and modify a number of
tests that expect to be skipped if imports fail or functions don't
exist to use import_function and import_module.  The ultimate goal is
to change regrtest to not skip automatically on ImportError.  Checking
in now to make sure the buldbots don't show any errors on platforms
I can't direct test on.
diff --git a/Lib/test/test_asynchat.py b/Lib/test/test_asynchat.py
index 5501c2d..14528d8 100644
--- a/Lib/test/test_asynchat.py
+++ b/Lib/test/test_asynchat.py
@@ -1,11 +1,13 @@
-# test asynchat -- requires threading
+# test asynchat
 
-import thread # If this fails, we can't test this module
 import asyncore, asynchat, socket, threading, time
 import unittest
 import sys
 from test import test_support
 
+# Skip tests if thread module does not exist.
+test_support.import_module('thread')
+
 HOST = test_support.HOST
 SERVER_QUIT = 'QUIT\n'