petsc4py: Support building with Py_LIMITED_API
All this work should not go to waste.
I'm not sure whether it is worth to put this under CI testing at this time.
Closes #1764 (closed).
PS: I'm not sure how --with-petsc4py is currently working in core PETSc, but using the feature introduced in this MR, it would be possible to build petsc4py in such a way that the binary extension modules can work with any Python>=3.10. To enable the feature, at the time petsc4py's setup.py runs, the environment must have PETSC4PY_BUILD_PYSABI=1 set.