Use pkg-config where available or detect the library using AC_LIB_HAVE_LINKFLAGS.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Merge branch 'better-detection' of github.com:nmav/sniproxy into nmav-better-detection

Conflicts:
	src/Makefile.am
	tests/Makefile.am
Add librt to detection, update it to handle missing config.rpath file
Add pkg-config to debian build dependencies
Merge branch 'master' into nonblocking-connect