Add mutex to linenoise calls in std::rl

#4758

Is it sufficient to reuse the preexisting lock function? Currently all globals must pass through a single mutex anyway. That does make this an anti-climactic fix.