Implement fourth case to preserve text selection

In this cases the entire content that was selected is deleted, therefore
the new selection has a size of zero.
Implement behavior for last selection tests

All cases 1-6 are now correctly implemented.
Refactorings in `EditorUtils.applyMultiTextEdit`