Sonnet: fix wrong language for suggestions in mixed-language texts
When AutoDetectLanguage is set, the same document can contain multiple
languages. In that case, Highlighter stores the language information
into the block's userdata, and changes the spellchecker language at
every change. So the suggestions were using whatever was the language
of the last block that was checked, which led to pretty random behaviour
for the user.
Fixed by using a QTextCursor to retrieve the cached language for the
word we're showing suggestions for.
Spellchecking in kmail composer, writing text in French
and having a signature with word in English.
Reviewers: sandsmark, mlaurent
Differential Revision: https://phabricator.kde.org/D9491