Pass delegate to chooseFrom: in ViCompletionController.

Before it was expected that the delegate would be set
before, but then ViCompletionController runs a reset when
it starts. This way we ensure that the completion controller
has the proper delegate while it's modally presented, and all
exit points reset the controller and clear out the delegate
by consequence, making this a safer flow.
keyManager:partialKeyString: declared as returning BOOL.

The invocation side was already treating it as if it returned a
BOOL, but the declaration didn't agree with it. This fixes that
problem, and returns NO from all the no-op handlers.
Add a default catchall action to ViMap for non-character keys.

ViMap's default action only passes on a particular range of
keystrokes. For complete-as-you-type, we need to be able
to receive all keys so we can pass them on to the text view
key manager. Without the catchall default action, we end up
missing things like alt-backspace, and never take action.
Close autocomplete popup on >1 character changes.

When the user makes a change that is >1 character, like a
word deletion, we force-close the autocomplete popup. In
the completion controller, we ignore invocations to cancel:
if there is no delegate, since that should mean the
completion window isn't up.

Lasty, we don't process smartindent if the completion popup
is cancelled/aborted. This prevents an issue with out of
range strangeness if the user cancels a completion at the
end of the line by doing a delete word.
Decide to hide the completion controller in setCaret:.

replaceCharactersInRange:withString:undoGroup: was
being used, but it doesn't get called from built-in Cocoa
functions like deleteWordBackward:. setCaret:, however,
does, and we can use it to determine whether there has
been a multi-character move in the caret. In those cases,
we close out the completion popup.
When leaving insert mode, close completion popup.

We only do this if we're leaving insert mode in the same
text view that the popup came from… Not sure any other
scenario should be possible, but this should keep us safe
from silliness. Or introduce silliness. We'll see.
If cancelling during autocomplete, completion window passes on keys.

This helps us pass on things like Esc and Ctrl-[ to the
text view, which can then properly leave insert mode. This
means that Esc/Ctrl-[ now leaves insert mode AND hides
the completion popup (more like vice versa), rather than
only closing the completion popup which feels clumsy.

When explicitly invoked via c-n/c-p, esc and family should
only close the popup, not leave insert mode.