configure: Add linker flags for ncursestest to correct position

Newer versions of GCC expect the linker flags after the object code, so
move the ouput of 'pkg-config --libs ncurses' there to not make the test
fail even if ncurses is present on the system.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
configure: Check for presence of pkg-config and ccache binaries

Check whether pkg-config and ccache are in the PATH. A missing
pkg-config will cause the configure script to abort with an error. The
presence of ccache is written to Config and used by the Makefile to
conditionally make use of it.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
configure: Improve check for libnl/libnl-genl

Actually call some functions in the check program so they will need to
get linked.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>