Fix pretty print of types when `__module__` is not available.
Fix pretty print of types when `__module__` is not available.

In Python 3, heap allocated types -- for example those created using
PyType_FromSpec -- lack the `__module__` attribute.

Closes #2684

ipython/ipython,ipython/ipython