ncurses: rewrite configure detection with pkg-config
ncurses: rewrite configure detection with pkg-config

This makes sure that the correct header files are checked and used.
That is to say the ncursesw headers as opposed to ncurses.

vlc-mirror/vlc,jomanmuk/vlc-2.2,shyamalschandra/vlc,xkfz007/vlc,jomanmuk/vlc-2.2,vlc-mirror/vlc-2.1,shyamalschandra/vlc,vlc-mirror/vlc,vlc-mirror/vlc,krichter722/vlc,jomanmuk/vlc-2.2,jomanmuk/vlc-2.1,xkfz007/vlc,xkfz007/vlc,xkfz007/vlc,vlc-mirror/vlc-2.1,xkfz007/vlc,jomanmuk/vlc-2.2,jomanmuk/vlc-2.1,vlc-mirror/vlc,krichter722/vlc,shyamalschandra/vlc,xkfz007/vlc,jomanmuk/vlc-2.1,shyamalschandra/vlc,vlc-mirror/vlc-2.1,krichter722/vlc,jomanmuk/vlc-2.1,jomanmuk/vlc-2.1,krichter722/vlc,vlc-mirror/vlc,krichter722/vlc,jomanmuk/vlc-2.2,vlc-mirror/vlc-2.1,krichter722/vlc,shyamalschandra/vlc,jomanmuk/vlc-2.2,jomanmuk/vlc-2.1,vlc-mirror/vlc-2.1,xkfz007/vlc,jomanmuk/vlc-2.1,vlc-mirror/vlc,shyamalschandra/vlc,vlc-mirror/vlc-2.1,krichter722/vlc,vlc-mirror/vlc,vlc-mirror/vlc-2.1,shyamalschandra/vlc,jomanmuk/vlc-2.2