Track compositor render state by LayerId
Change the compositor render state from per pipeline to per layer.
Tracking per layer prevents the compositor from compositing until *all*
layers are finished rendering. Without tracking per layer the ref test
position_fixed_overflow tends to fail for machines under heavy load.