Replace newlines during normal mode's paste.

When pasting using command / normal mode, the newlines were inserted as
is, possibly leading to a file containing mixed end-of-line characters.

Replace these just before pasting the contents of a text register.
Replace newlines during visual mode replace paste.

When pasting / replacing using visual mode, the replacement text might
contain newline characters which don't match the current editor's
end-of-line characters.

Replace the newlines in the register with the editor's type before
pasting.

Also added a snapshot test to test this replacement in multiple modes.
Reformat handleKey, mark special keys as handled.

Function contained mix of spaces and tabs.

Certain keys like <C-R> or <ESC> would also be sent to the editor
because handleKey returned false. This in turn caused trouble for the
snapshot tests.
Replace newlines during Insert register command.

When pasting / replacing using insert's "Insert register" mode, the
replacement text might contain newline characters which don't match the
current editor's end-of-line characters.

Replace the newlines in the register with the editor's type before
pasting.
Add "insert register" snapshot, fix test stubs.

TestCursorAndSelection would return null if not in visual mode. Changed
it to always return a default empty selection.

Add a test which inserts a register in Insert mode.
Replace pasted newlines with <CR> in command line.

Vim actually shows ^M or something similar, but we don't handle escape
codes. Replace with <CR> as the closest thing.
Newlines seem handled, remove TODO note.
Merge pull request #292 from albertdev/newline-conversion

Newline conversion when copy/pasting between editors