[Mosaic GPU] Make tests involving global state order-independent.
Previously we would fail to systematically empty the cache before running a
test, leading tests verifying compilation to hit the cache---taking an
unexpected path.
Similarly, the id of the module in `MosaicGpuUsesCommandBuffers` depends on
the number of modules that were compiled before it within the same client.
We now query the list of files matching the desired pattern in order to avoid
specifying a concrete id.
PiperOrigin-RevId: 884342514