Revert "reverted changes to porter stemmer, because they inadvertently introduced different behaviour of the stemmer"

This reverts commit 2adb08c320052e82366684893600024fb0515a96.
fixes to earlier porter stemmer refactor