scene: Sync Window::readyForPainting() to window item visibility
If a window is made ready for painting with some delay, the item won't schedule an update. To fix that, sync the item visibility state with Window::readyForPainting(). When the item visibility changes, a repaint will be scheduled.
(cherry picked from commit 37c4a453)