curses one is installed by:
1. not reinstalling the curses one after restarting
2. not sending KEY_RESIZE
Also, update the size of curscr, stdscr and __virtscr to match the new
screen size, so that their sizes are always updated.
Fixes the cases where applications call endwin() and then refresh() in
their SIGWINCH handler (i.e. the resizing problems in PR pkg/27777).