Numerous fix-ups to C API and docs.  Added tests for C API.
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py
index f393712..2ebeff6 100644
--- a/Lib/test/test_set.py
+++ b/Lib/test/test_set.py
@@ -6,6 +6,7 @@
 import pickle
 import os
 from random import randrange, shuffle
+import sys
 
 class PassThru(Exception):
     pass
@@ -402,6 +403,11 @@
         s = None
         self.assertRaises(ReferenceError, str, p)
 
+    # C API test only available in a debug build
+    if hasattr(sys, "gettotalrefcount"):
+        def test_c_api(self):
+            self.assertEqual(set('abc').test_c_api(), True)
+
 class SetSubclass(set):
     pass
 
@@ -1372,7 +1378,6 @@
 #==============================================================================
 
 def test_main(verbose=None):
-    import sys
     from test import test_sets
     test_classes = (
         TestSet,