Allow printing of REPL objects in a REPL

Prevent a recursive show call with Prompt objects
Make LineEdit and the REPL re-entrant

Previously, the keymap functions were assigned a name with the eval macro (in global scope). This changes the keymap macro to instead return an anonymous function so that additional instances of the REPL don't clobber the keymap functions of previous ones.
Merge pull request #6413 from mbauman/repl-debug

Make the REPL re-entrant and easier to debug