asahi: Move a bunch of helpers to common
These have no real Vulkan or Gallium dependence and are (as such) useful for both VK and GL without any real change in level of abstraction. Do the code motion.
Also, 8-bit math.
All patches from AGXV branch