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.