lavapipe: rewrite/reorder

Merged Mike Blumenkrantz requested to merge zmike/mesa:lvp-rewrite_reorder into master

this rewrites lavapipe command streams to move descriptor updates after draw/dispatch commands and then flush states upon beginning queries, ensuring there are no use-after-free scenarios because descriptors will always be up to date

not sure this is entirely correct, but it does fix #4476 (closed)

Merge request reports