[misc] We different versions of Lucene on different branches so we must make sure the index folder is not reused across branches during tests.

(cherry picked from commit 09528b3e668a8b3c577252a2a12c1d6bd5a8917a)