gh-154055: Gate optional curses functions absent on old SVr4 curses (GH-154057)
Build hygiene so the curses modules build against a limited curses (e.g. the
native SVr4 curses of illumos/Solaris), matching how other optional functions
are already gated:
* Probe and #ifdef-gate the X/Open attr_t functions (window.attr_get/attr_set/
attr_on/attr_off/color_set), the soft-label attribute functions
(slk_attr_on/off/set, slk_color) and scr_set(); scr_set is probed separately
from the scr_dump family, which SVr4 has without it.
* Stop gating update_lines_cols() on resizeterm(): it only reads LINES/COLS and
is used unconditionally (e.g. by set_term()), so a build without resizeterm()
failed to link.
* On Solaris/illumos define _BOOL (and include <stdbool.h>) so the SVr4
<curses.h> "typedef char bool" does not clash with C's bool.
test.test_curses: skip or guard the tests that use the now-optional functions,
split test_attributes so its chtype-based part still runs, and treat the native
curses of NetBSD and illumos/Solaris as having broken newterm() (they crash on
repeated newterm()/delscreen(), like ncurses before 6.5).
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>