Use language id instead of CodeMirror mode in CodeHintManager

A possible fix for: #3085.