clojure: optionally use rlwrap

Closes #18010.