gh-101178: Fix possible integer overflow in Ascii85 encoder with wrapcol=1 (GH-144778)

It could happen if the size of the input is more than 4/5 of sys.maxsize
(only feasible on 32-bit platforms).

Also simplify the integer overflow checks in the Base64 encoder, and
harmonize them with the code for Ascii85 and Base85.
1 file changed