Enable text view’s context menu actions
Update spelling panel and use when visible
Use local variable for document->buffer()
Enable “Check Spelling as You Type” in checkSpelling:

This is required so that we have the proper meta data (misspelling ranges).
Synchronize spelling panel and buffer languages

If the spelling panel is visible when checkSpelling: is invoked then its language is taken and used for the buffer. If the panel is not visible, the buffer’s language is set for the spelling panel.

We probably should also set the spelling panel’s language when switching document, and when the panel is first opened. I don’t think the code complexity is really worth it though (depends on how often one use the spelling panel with a non-default language).

Fixes #1104
Use specialized menu for Check Spelling

We only show “Find Next” (previously “Show Next”) when context menu is shown as a result of “Check Spelling” and we leave out the other actions.