[Threaded Compositor] Modernize and simplify threaded compositor code