vim: Support count before modifier

For commands with a modifier, the optional count may precede either
the command or the modifier. The latter is slightly more intuitive
in many cases ("delete two words" vs. "two delete words"), so add
support for it.

https://bugzilla.gnome.org/show_bug.cgi?id=737909
vim: Keep cursor on changed word for ctrl-a/x

Vim's ctrl-a/x commands keep the cursor at the end of the modified
word, which allows for repeated increments/decrements. Match that
behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=737910
vim: Take count into account when deleting/yanking whole lines

Currently we only delete/yank a single line when using dd/yy,
fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=737911
vim: Handle count in delete_to_end

'D' is documented to "Delete the characters under the cursor until the
end of the line and [count]-1 more lines". Do that.

https://bugzilla.gnome.org/show_bug.cgi?id=737911
vim: Factor out apply_motion() method

This saves a couple of lines and fixes count being ignored in yank.

https://bugzilla.gnome.org/show_bug.cgi?id=737912
vim: Change 'requires_modifier' bool to a flag type

Whether a command requires a modifier or not is not the only way
vim commands may differ. To avoid parameter creep as support for
those is added, make the parameter a flag.

https://bugzilla.gnome.org/show_bug.cgi?id=737912
vim: Generalize support for {visual}commands

Replace the current workaround for yank with a VISUAL flag to mark
commands that can be used with an existing selection. This is still
quite different from the handling in vim, where selections constitute
a separate mode with its own command set - so 'y' in normal mode is
a different command than '{visual}y' (a.k.a. 'v_y') in visual mode.
Usually {visual} commands correspond closely to a normal mode command
using the same key though, so this approach should work just fine
for the most common cases.

https://bugzilla.gnome.org/show_bug.cgi?id=737912