SI-7650 No bang expansions in REPL jline

Disable expandEvents at the earliest opportunity.
Add doWith method to wrap acquire/release of Lock