Move modes into separate package; start using commands

Insert mode is fully converted, Normal mode has only basic movement covered.

The only exception right now is Command mode, which uses a lot of
internal editor machinery.