WIP: expressions -> functions in REPL code. Fixes #7178

This replaces the macro and expression code in LineEdit with higher-order functions. It is *mostly* working. Things that don't work yet: bracketed paste mode and some escape keys like page up/down. There may be others. Nonetheless, standard expression input, command, help, and history search modes appear to work.

I've mostly kept the keymap data structures unchanged. The biggest difference is that keymap values now must be functions that are callable with the signature `(PromptState, AbstractREPL, Char)`. It would be nice to automatically normalize keymap functions to accept this signature, but I have punted on that for now.

I have no idea yet what the performance impact will be of leaning so heavily on anonymous functions in LineEdit. It will certainly be slower than the old code, but the difference isn't large enough for me to notice in interactive use on my machine.