Convert all tabs to 4 whitespaces

Tabs where erronusly introduced in 993abf57
Reintroduce pkg-config based searching for ncurses

Fixes issue rased in #358
Conditional curses detection

Make the whole extra curses/ncurses/ncursesw only check if we didn't
find tinfo the "old" way.