credentials: memory safety

The docs say to use tp_free() to free the memory, and even though we use
PyObject_Del() everywhere else, using this in the credentials does cause
issues.
credentials: use more ducks

Instead of making everyone inherit from our credential types, use an
interface with two attributes, which makes the C code much shorter and
simpler.