[REPL] Fix ends_with_semicolon on adjoint operator with comment (#58364)
Removes yet another ad-hoc lexer from the REPL and replaces it with
JuliaSyntax.
Fixes #46189, with tests taken from (and superseding) #57974.
Co-authored-by: Páll Haraldsson <Pall.Haraldsson@gmail.com>