Prevent bad viewability changes

If we call viewabilityChanged and everything
is stable, make sure we don't call viewabilityChanged.
Revert "Revert "Send events to clients in the next iteration of the mainloop""

This reverts commit a0c1863419ca048ec9597e88fabeeb74651da027.

Hm, it turns out this is correct, maybe? Events can't possibly be ordered
globally, as the client can be as slow as it wants to process them.