LUCENE-4955: Fix NGramTokenizer and NGramTokenFilter, and remove them from TestRandomChains' exclusion list (merged from r1476135).

In addition to the trunk changes, I had to fix SlowSynonymFilterFactory to reset the token stream before consuming it.


git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/branch_4x@1476159 13f79535-47bb-0310-9956-ffa450edef68