REPL: Fix call to correct `hascolor` function (#61142)
`REPL.hascolor` and `Base.Terminals.hascolor` are two different generic
functions. The method for `::TextTerminal` is a method of the latter.
Detected by JET.
(cherry picked from commit 2aa3d629281f04fddabf2fae0a364f2f89f10bf1)