Introduce per-version QueryCache

o This avoids allocating pairs of (version, query)
o This avoids allocating lambdas in prepare for compiler-2.1