add support for python ABCs

Beginning with version 2.6, python supports abstract base classes,
which contain a class hierarchy for numbers. This class hierarchy is
very similar to the one of numpy, so it is very easy to register
the numpy type hierarchy with the python type hierarchy.

This pull request adds those registration and test cases for it.