Catacurse fixes (closes #1045)

Make newwin properly handle ncols or nlines being 0 (special value, per the API specs). Closes #1045.

Add a missing return statement to getch.