Update `pythoncapi_compat.h` to upstream commit
c84545f0e1e21757d4901f75c47333d25a3fcff0, which includes fixes necessary
for Pillow to build against PyPy3.11. Otherwise, it fails due to
duplicate declarations:
```
In file included from src/encode.c:28:
src/thirdparty/pythoncapi_compat.h:295:1: error: static declaration of ‘PyThreadState_GetInterpreter’ follows non-static declaration
295 | PyThreadState_GetInterpreter(PyThreadState *tstate)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/pypy3.11/Python.h:80,
from src/encode.c:26:
/usr/include/pypy3.11/pystate.h:35:33: note: previous declaration of ‘PyThreadState_GetInterpreter’ with type ‘PyInterpreterState *(PyThreadState *)’ {aka ‘struct _is *(struct _ts *)’}
35 | PyAPI_FUNC(PyInterpreterState*) PyThreadState_GetInterpreter(PyThreadState *tstate);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
* Simplify Python code by receiving tuple from C, as per #8740
* Use default PyTypeObject value
* Removed AVIF_TRUE
* Width and height are already set on first frame
* Removed memset
* Depth is set by avifRGBImageSetDefaults
* Replace PyObject with int
* After a failed pixel allocation, destroy non-first frame
* Added error if avifImageCreateEmpty returns NULL
* Python images cannot have negative dimensions
* Test invalid canvas dimensions
* Use boolean format argument
* Handle avifDecoderCreate and avifEncoderCreate errors
* tileRowsLog2 and tileColsLog2 are ignored if autotiling is enabled
* Only define _add_codec_specific_options if it may be used
* Test non-string advanced value
* Simplified error handling in AvifEncoderNew
* Corrected heading
---------
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>