Fix a couple of bugs exposed by the new __index__ code.  The 64-bit buildbots
were failing due to inappropriate clipping of numbers larger than 2**31
with new-style classes. (typeobject.c)  In reviewing the code for classic
classes, there were 2 problems.  Any negative value return could be returned.
Always return -1 if there was an error.  Also make the checks similar
with the new-style classes.  I believe this is correct for 32 and 64 bit
boxes, including Windows64.

Add a test of classic classes too.
diff --git a/Misc/NEWS b/Misc/NEWS
index 49de4b6..f81389d 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,12 @@
 Core and builtins
 -----------------
 
+- Fix bug related to __len__ functions using values > 2**32 on 64-bit machines
+  with new-style classes.
+  
+- Fix bug related to __len__ functions returning negative values with
+  classic classes.
+  
 - Patch #1538606, Fix __index__() clipping.  There were some problems
   discovered with the API and how integers that didn't fit into Py_ssize_t
   were handled.  This patch attempts to provide enough alternatives