More IME hookup

Hooked up the majority of the pipeline now.

Unfortunately there doesn't really seem to be a good answer of what to
do if the user switches modes in the middle of provisional input.
Looking to gVim isn't an answer here because it doesn't really have the
API.  For now just going to incorrectly pretend that IME is complete at
that point.
Added a VS integration test