LUCENE-5857: genLookaheadCountLimit configurable, add genLookbackCountLimit

https://issues.apache.org/jira/i#browse/LUCENE-5857