vrend: check qbo resource is valid
If res->id is 0 then no buffer ends up binding to GL_QUERY_BUFFER and "If no buffer is bound to GL_QUERY_RESULT_BUFFER, then params is treated as an address in client memory of a variable to receive the resulting data."
Tested glcts --deqp-case=KHR-GL46.*query*
Closes: https://gitlab.freedesktop.org/virgl/virglrenderer/-/issues/394