gh-157710: Soft deprecate C API modifying str objects (#157711)

Soft deprecate PyUnicode_New(), PyUnicode_CopyCharacters(),
PyUnicode_Fill(), PyUnicode_Resize(), PyUnicode_WRITE() and
PyUnicode_WriteChar() functions. Use the PyUnicodeWriter API instead.

* Add tests on PyUnicode_New() and PyUnicode_Resize(). Check that the
  result is either a mutable string or the empty string singleton.
* Check that PyUnicode_Fill(), PyUnicode_CopyCharacters() and
  PyUnicode_WriteChar() fail to modify a string with 2 references.

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
6 files changed