Issue #22111: Assorted cleanups in test_imaplib.  Patch by Milan Oberkirch.
Simplify code in multiprocessing.Connection.send_bytes().
Followup to issue #20540; patch by Serhiy.