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.
Close some leftover fd's
Have ssh close stdin and forceallocate pty

Somehow we still need to have a real pty on stdin to ssh so
window-size-thingie works.
Replace IO::Pty with pipe

Now when we don't need some fancy pty for sending on window-size and
reading proxy-output from, just use a regular pipe to drop dependency on
IO::Pty

[closes #378]
Remove dependency on IO::Pty
fix a perror() message in mosh-server

A perror() message flanking an open() call was reading "dup2" where it
should read "open".

[closes #377]