corpus: add a generation number for future query caching

Change-Id: I07dd61756537688f4f5e68bbcaf93bff75aaddc9