Hack yet another place where we need to use _codeMirror.replaceRange()...

...in code hints to make them work in inline editors because of #1688. Sigh.

Fixes #3709.

To @eztierney for review. It looks like this is the single place where JS code hints actually edits the document, so I think this is the only place we have to patch this up. Let me know if there's another place we might have to do this fix.