IDLE: Create function to update menu item state. (GH-11343)

This will be needed for other menu items.  Change outwin to call the function instead of updating the menu item directly.
diff --git a/Lib/idlelib/outwin.py b/Lib/idlelib/outwin.py
index f6361eb..ecc53ef 100644
--- a/Lib/idlelib/outwin.py
+++ b/Lib/idlelib/outwin.py
@@ -78,8 +78,7 @@
         EditorWindow.__init__(self, *args)
         self.text.bind("<<goto-file-line>>", self.goto_file_line)
         self.text.unbind("<<toggle-code-context>>")
-        self.menudict['options'].entryconfig('*Code Context',
-                                             state='disabled')
+        self.update_menu_state('options', '*Code Context', 'disabled')
 
     # Customize EditorWindow
     def ispythonsource(self, filename):