panfrost: Move some code to src/panfrost/lib
Move some bits out of the gallium and remove any gallium-ism so it can be shared with the future Vulkan driver.
Move some bits out of the gallium and remove any gallium-ism so it can be shared with the future Vulkan driver.