clear BufferedRWPair weakrefs on deallocation (closes #22517)

--HG--
branch : 3.3
extra : source : 9b4673d7b046fc8b169a5e7f962493999444d3f3
prevent overflow in unicode_repr (closes #22520)

--HG--
branch : 3.3