Initial incomplete version of tty menus.  tty_menu_activate not done yet.
Second commit; does not compile yet.

Finalized saving of current_matrix and restoring into desired_matrix.
Added margin areas, when non-empty, to save/restore.
Replaced ScreenRetreive and ScreenUpdate with the new functions based on
saving and restoring glyph matrices.
Started work on reading input via read_char while inside menu display.
Merge from trunk after a lot of time.
Made HAVE_MENUS the default; comment fix in term.c.
Fixed C compilation problems.
Removed unnecessary tests for GUI sessions and created menu faces.
Minor fixes to interfaces, avoid assertion violation under GLYPH_DEBUG.
Fixed display and padding of menu items; File menu displays OK.
Use AREF instead of XVECTOR; crashes still here.
Converted compile-time tests to run-time tests.  Menus display!
Turn off text cursor when dropping down menus.
Fixed the menu item encoding for tty menus.
Crude code to simulate keyboard/mouse input in menus via GDB.
Record and use cursor coordinates in menu.  Active face and help echo work!
No need to pay attention to window margins.
Fixed minor issues with truncation of menu items.
Fixed frame save/restore and 'mouse position' tracking.
Fixed screen restoration after popping down a menu.
Fix a buglet in calculating menu width.
Fix a blatant bug in restore_current_matrix.