SI-4684 Repl supports whole-file paste (rebased)

Re-rebased #2719: Rebased #2696 

The first test repl-paste4 was failing for an unknown reason, with no diff in the build output.

This version makes that test a SessionTest with no check file.  The research question is whether that changes how line endings are handled.

The second test was already a SessionTest but used a private version, but now it can use the class in partest.