Split out the code responsible for inserting text in multi-line block
selection from typeChars to a new function, insertTextInBlock(), which
can be used in replaceText() to handle text completion when in block
When getting possible text completion matches from the current document,
the code skips the word the cursor is inside; extend that behaviour for
block selection too.
Add a unit test for the new completion behaviour with block selection.