SI-7637 Repl edit command

This PR still has usability issues for console editors, in that you can't use them, but gedit WFM.  Also working on a unit test, since jline is turned off for tests; it might entail fattening the "common history interface" just to enable testing; otherwise, the history support is jline-specific.  Comments welcome; assume there is a generous latency period before this will receive attention.

Open an editor with historical text.

:edit id will use the complete text of the defining line, including
a multiline expression or template definition.  The id must be a term
or type in scope, in particular, defined in the current session.

:edit line will use the specified line(s) from history, as a line
number (123), range (123-130), offset (123+7), remaining (123-) or
previous (-10 for last ten lines).

The env var EDITOR is used to specify an editor to invoke.

If EDITOR is not set or if :line command is used, the selected text
is added to the end of history.

Text is still added to history one line at a time (cf SI-1067).