Multiple screencasting fixes
This MR includes three fixes related to screencasting I ran into on Apple platforms.
One of screencast: Don't skip the last valid modifier
or dmabuf: Create buffers without the SCANOUT flag
are required for screencasting to work at all on Apple M1/M2 platforms using the downstream asahi Mesa driver with OBS (but both are desirable, and probably fix other platforms/apps too). The second one also generally improves performance on drivers that can use more efficient framebuffer formats that are incompatible with scanout (e.g. it enables twiddling and framebuffer compression on Apple GPUs, which has significant performance benefits including a large reduction in memory bandwidth).
The third commit (kwinglutils: Restore the default FB when the last FBO is unbound
) fixes a GL warning, but I'm not sure if that was actively breaking anything otherwise.
(If there is a release branch already cut or maintained, I'd ask for at least the first patch to be backported to it, as screencasting doesn't work at all without it).