optimize situations where underlays fail to be used
Previously when the color pipeline couldn't be matched, every frame KWin would
- allocate a new buffer for an overlay plane
- check the color pipelines for the underlay, which fails
- disable the overlay layer again, which also deletes that new buffer
This can be relatively expensive. The fix is simply to check color pipelines before re-allocating anything. On my system it's not quite as bad in the bug report, but this still reduced CPU usage by 25% while night light is active and vkcube is running.
We can still get into similar situations if the atomic test fails instead of something we can check earlier, but I'm not 100% sure how to best optimize that yet and it can be done separately.