We can stuck on window closing if control report empty dirty region (f.e. label control without text or control group without child controls) because we rely on CGUIWindow::Render() being called to finish window closing (which won't be called as empty dirty regions are discarded in dirty region tracker).
This decouples rendereing and window closing by adding new AfterRender() methods that will be called each frame (regardless of dirty region state) that will handle window closing.
More details in http://trac.xbmc.org/ticket/13650
decouple rendering and window closing, add AfterRender method (that w…
…ill be called each frame even if we actually didn't render anything) and move window closing logic there