RFC: new REPL

@loladiro's REPL.jl code, plus the path completion behavior from #5343, and a few minor bugfixes.