Allow extension types to be inherited.

Add `Py_TPFLAGS_BASETYPE` to the `tp_flags` member for extension types. This changes allows them to be used as a base class.