[x11] Refactor output updates
The current code has multiple index-based for loops iterating over items we get from XCB
Dealing with raw indices is error-prone and not pretty
By using std::span we can replace these loops with range-based for loops
Also remove some intermediate containers that aren't neccesary
Edited by Nicolas Fella