Rewrote the Spellchecker class so that we can have better control over the context menu and spellchecker.
Ideally spellchecker should detect the language, but on macOS, it fails to auto-detect the lanugage user is typing in that's why we need to mention it explicitly. We set this language with the help of the default language of the server.