[fix] [python client] Better Python garbage collection management for C++-owned objects (#16535)

Fixes https://github.com/apache/pulsar/issues/16527
4 files changed