[NUI] Fix Window.Dispose and Layer.LayoutCount