pymethods: add support for `__del__`
Closes #2479
I found today that if we don't implement tp_dealloc then the default tp_dealloc implementation (at least for CPython) will call tp_finalize. This gives us a potential route to support this and also fix #3064 at the same time.
However the documentation in this area is confusing, as it implies that tp_dealloc doesn't have a default - https://github.com/python/cpython/issues/105018 / https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_dealloc
I think it may be possible that we use that default implementation to support this case, but we'll need to test carefully whether this also works for all Python versions, PyPy etc.
I spoke to vstinner (thought no need to ping so no @) briefly about this, I understood that PyObject_CallFinalizerFromDealloc could be added to the limited API in 3.13. So maybe we can figure out a way to proceed with this where __del__ is supported without abi3 for now and then we can add abi3 support on 3.13.