asahi: Generalize query logic
In the near future, we will need to support GPU queries other than occlusion queries (e.g. PRIMITIVES_GENERATED
with an indirect draw, since the # of primitives generated is not known on the CPU but is known on the GPU). This series generalizes agx_query.c
to handle this. The idea is that we track queries on the batch and accumulate their results on sync (just like occlusion queries), but rather than allocating an occlusion buffer for the results we just allocate some memory from the batch pool.