Re-add "undo removed tail" on completion

Merged Kåre Särs requested to merge work/re-add_undoing_removed_tail_on_completion into master

This used to work only for the "standard" completion model and got removed when the code was refactored. This change makes this feature available for all the CodeCompletionModels

If a model moves the cursor after inserting the new text, the undo will insert the tail at the new cursor position.

Merge request reports