LUCENE-3911: improve BaseTokenStreamTestCase random string generation, fix off-by-ones in TestUtil string gen methods