Backported multiple suggestions in spellchecker from 3.x

This PR backports some improvements from the 3.x branch to 2.4.x. I needed to do this for compatibility issues that prevent me from using 3.x. Are you fine with accepting this patch and tagging it as 2.4.2? If you want me to re-target it to a different branch please let me know :)

Thank you very much,

Aldo.