Add test showing reproducible crash when using dictation on OSX 10.9

Dictation engines enter new data via the same IME mechanism that multi
-language support uses. In this particular instance, the dictation
program supports the phrase "new paragraph" or "new line", which causes
it put a new-line character in the event trap, which the IME handling
happily converts directly into an InsertText op with a new line.
Allow insert text op to gracefully cope with strange whitespace

If an insert text operation is created that contains non-tab non-space
whitespace characters (e.g, \r\n etc.), these will now be treated as if
they were simply space characters and inserted accordingly. A warning
is logged for diagnostics purposes.

This prevents crashing on unexpected behaviour because the number of
inserted steps is consistent with the operation's text length.
Support text composition events that contain line breaks

Using the paste-handler for text that contains new lines
allows the inserted text to correctly create new paragraphs
as necessary.
Optimize paste handling to only create new paragraphs if necessary

If there is only a single line of text, there is no need to split and
then rejoin any paragraphs. The pasted text can simply be inserted via
an insert text operation directly.
Merge pull request #547 from peitschie/dictation-crash

Support text composition events that contain line breaks