Merge #13159: Replace FileIO's quadratic-time buffer growth algorithm with a linear-time one.

Also fix the bz2 module, which suffered from the same problem.
diff --git a/Misc/NEWS b/Misc/NEWS
index 3b0d973..63099ac 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1342,6 +1342,9 @@
 Extension Modules
 -----------------
 
+- Issue #13159: FileIO and BZ2Compressor/BZ2Decompressor now use a linear-time
+  buffer growth strategy instead of a quadratic-time one.
+
 - Issue #10141: socket: Add SocketCAN (PF_CAN) support. Initial patch by
   Matthias Fuchs, updated by Tiago Gonçalves.