gallivm/st: add flags arg to get_query_result_resource api.
Currently this just has wait, but in order to get the right answer for vulkan partial, lavapipe/llvmpipe need to pass a partial flag through here in the future.
This just changes the API so that's possible.