gh-155976: Refresh curses LINES, COLS, COLORS and COLOR_PAIRS on screen switch (GH-155994)

set_term() and screen.use() now update curses.LINES, curses.COLS,
curses.COLORS and curses.COLOR_PAIRS to the values of the current
screen.  LINES and COLS are taken from the size of its standard window,
since ncurses sets its own LINES and COLS only when a screen is created.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
3 files changed