refactor word stripping logic to a subroutine
reorder punctuation stripping

Fixes #9
strip leading and trailing punctuation, except periods

Leading and trailing punctuation is entirely stripped since the
spellchecker won't care anyway.  Trailing periods are *not* stripped as
they might be abbreviations ("Ph.D."), but such words are checked
against the stoplist both with and without trailing periods to account
for abbreviations and words at the end of a sentence.