Add function InvokePrompt to re-evaluate prompt

InvokePrompt can be used from a custom key handler to invoke the
prompt function again.  This is done in a way that minimizes changes
to the display - the previous prompt is overwritten and the cursor
is placed where it was before the prompt was evaluated previously.

The current input is also preserved.