Change our type creation to add the extra PyHeapTypeObject fields

This is so that we can add the CAPI slots for things like tp_as_sequence,
so that C extensions will work properly.

I don't think there are very many extensions that would do this but let's
still support it for now; it further bloats the type objects but only as
much as it does in CPython as well.
Import more code from CPython, and add the slotdef for mp_subscript