vkr: add a few resource validations
Summary:
- validate shmem resource type before use
- protect reply encoder resource from invalid resource destroy
- simplify nested decoder resource and validate against invalid resource destroy
Stat:
- Closes: https://gitlab.freedesktop.org/virgl/virglrenderer/-/issues/497
- Closes: https://gitlab.freedesktop.org/virgl/virglrenderer/-/issues/499
- No perf regression in trace replays and vkmark
Edited by Yiwei Zhang