runtest: Don't worry about how implementation echoes input
Some of the complexity of runtest is in the way that it insists on
checking whether the implementation managed to echo its input line
correctly. This isn't really an important part of the implementation,
though, and when using friendly line-editing libraries the echoing can
often end up containing escape sequences. Simplify things by just
assuming that anything up to the first newline is our input being echoed
back.
This also means that various pre-processing of input is no longer
required.