Overhaul window and menu handling

Consolidated window pointers and menu layer pointers into the arrays
"g_windows" and "g_menu_layers", replaced "g_game_mode" with
"g_current_window", removed the "set_game_mode" function, replaced
"add_item_to_inventory" with "add_current_selection_to_inventory",
adjusted the "show_window" function and all menu-related and
init/deinit-related functions, etc.