Move history_free and history_init to higher-level menu_common.c