Reworked command loop, added line completion support.

The -complete option now is for the line completion callback.
The check for contination lines moved to -continued. The inverted
sense caused a bit more restructuring in the loop, and for the default

Channel selection for command result is now inlined, without a state variable.
Reworked the single-shot prompt command. Now taking options.
New support for hidden input, and history extension.
More tweaks to the command loop. Replaced fixed reporting of execution results with a callback.

The default callback now provides the old functionality, reporting to stdout or stderr
(choice depending on the type of the result (ok, fail)).