Set range correctly for partial completions.

We were passing an non-updated range for partial
completions, which could lead to odd behavior when running
partial completions e.g. in the ex field.
Switch partial completions to new completion insertion strategy.

We were still doing the old replaceRange-based completion
insertion; this switches it to the new virtual input insertion
style.
Update caret before triggering autocompletion.

Because the completion dialog is modal, processing for that
particular keystroke stops until the completion popup goes
away in the situation where we show the completion popup.
This means we never get a chance to show that the caret
moved to after the currently inserted character. We now
update the caret explicitly before showing the completion
popup so that it updates correctly in the UI. This fixes a
couple of other bugs with snippets, as well.
Tab always accepts the current suggestion in autocomplete mode.

Before we completed partially in that situation, but that
meant the popup would never go away if there were multiple
matches for the current completion with the same length.

That made triggering a snippet when typing if in a file where
both if and IF were being used, for example, completely
impossible