Add lock for simultaneous access to StemWord, fixes #1