Rewrite of lib_cli-common.lib to simplify and fix f_create_LIST_APPS which broke when rewrote f_menu_module_display.