2to3: Apply types fixer.

Python 3 removes the builtin types from the types module. The types
fixer replaces such references with the builtin types where possible
and also takes care of some special cases:

    types.TypeNone           <- type(None)
    types.NotImplementedType <- type(NotImplemented)
    types.EllipsisType       <- type(Ellipsis)

The only two tricky substitutions are

    types.StringType         <- bytes
    types.LongType           <- int

These are fixed up to support both Python 3 and Python 2 code by
importing the long and bytes types from numpy.compat.

Closes #3240.
Merge pull request #3242 from charris/2to3-apply-types-fixer

2to3: Apply types fixer.