Resolve crashes on exit with visible MyGUI widgets
Resolves #5899 (closed) where closing the game with visible modal windows or dropdown menus would lead to a crash.
Explicitly set widgets visibility to false before deleting them to ensure all the children (specifically popups/comboboxes) are properly deleted. Also delays deletion of KeyboardNavigator
until after the deletion of the MessageBoxManager
since these modal windows depend on it.