PY: continue renovation of extension
Fixed unchecked malloc for "tail" input data.
Fixed inconsistencies in docstrings.
Rewritten "growable buffer" to C-code, so it could run without acquiring GIL.
Breaking changes:
- native object allocation failures now handled at object creation time
- some lower level exceptions (e.g. OOM) are not shadowed by brotli.error
PiperOrigin-RevId: 810813664