configure.ac: Test for libtinfo to resolve setupterm(3).
configure.ac: Test for libtinfo to resolve setupterm(3).

ncurses 6.0+20170902-2 on Arch Linux doesn't provide setupterm();  it
did in earlier versions.  This stops ./configure finding a suitable
library.  Add tinfo to the search list, as that's the lower-level
library that contains setupterm() now, and place it before curses and
ncurses so the search stops if it's sufficient instead of the larger
libraries.

mcr/nmh,mcr/nmh