Fix extended help hint to give full line to enter (#51193)
Before this commit, the REPL would say:
Extended help is available with `??`
Now it will give the full line required to display extended help:
Extended help is available with `??LazyString`
I believe that this was the intended function of the code that's already
here, because currently the `extended_help_on` constant is never used.
I've resisted the urge to pass the `line` through to `trimdocs` without
a global because I don't know why @timholy did it that way to start with
and because the smaller change makes this PR easier to review.