gh-136687: Add ./configure --with-curses to select the curses backend (GH-153992)
Add --with-curses=ncursesw|ncurses|curses|no, mirroring --with-readline.
The default (auto) keeps the current behaviour: prefer ncursesw, fall back
to ncurses. --with-curses=curses links the system's native curses (e.g. on
NetBSD or Solaris), which has no pkg-config file and was previously
unreachable; it is built with wide-character support when the library
provides it. --without-curses excludes the curses and _curses_panel modules
from the build.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>