Update to latest CM; fix up code hints to explicitly set cursor

The latest CM changed `replaceRange()` so that if the cursor is at the beginning of the replaced text and a range is being replaced (instead of inserted), the cursor now stays there instead of being pushed to the end. This fixes up HTML and JS code hints so that they retain the original behavior (of pushing the cursor to the end) by simply setting the cursor position afterwards.

@RaymondLim -- could you look at this one? (When this is merged, it should include the fix for #3201 as well.)