[cmv4] Fix code hint unit tests - take 3

This is for #6042 and unit tests for url hints and js parameter code hints.

Changes:

* `token.className` has been replaced with `token.type`.
* CodeMirror "onKeyEvent" option is no longer supported, so use separate key events.

cc @njx