REPL tests based on direct interaction with input and output stream. Includes multiline tests.
Remove testing TODO
final tweaks to REPL rewrite

We can still use some more extensive tests, but it's already much better
tested than the current REPL.