Add optional support for spell checking
This is based on some old code that I wrote in May 2014 (!) and which
was subsequently fixed and cleaned up by Martin. I should have picked
these pieces much, much sooner...
Relevant git commits: 00ab5e33, c051a4d9
Co-Authored-By: Martin T. H. Sandsmark <martin.sandsmark@kde.org>
Change-Id: I94ecdbcea15268418e332496fd2febb752d39bf6