Issue #22777: Test pickling with all protocols.