lavapipe: asan fixes (part 2)
This is a few more fixes for ASAN reported bugs in lavapipe.
The first 3 are fairly self explanatory
the last one is a bit of a WIP, not really sure how best to deal with that particular issue (@sroland might have some ideas)