Fix memory leak in tostring_rgba_minimize(). (#3197)

The APIs being used in PyCXX (and Python C-API) were not actually taking
ownership. Instead, make Python allocate memory.
Merge pull request #3207 from dopplershift/fix_memory_leak

Fix memory leak in tostring_rgba_minimize(). (#3197)