Separate main and secondary menu init, etc.

Separated "(de)init_menu_windows" into "(de)init_main_menu" and
"(de)init_secondary_menus", added a "main_menu_appear" function, and
made various improvements to the management of menus, stats, status
effects, game mode transitions, etc.