check for header-files if libglfw is detected

if only the library is installed (but not the dev-headers),
GEM_CHECK_LIB will return SUCCESS (as it succeeds to link and does
not check for headers).

LATER: add an (optional) "headers" field to GEM_CHECK_LIB to centralize this
added HEADERs argument to GEM_CHECK_LIB

currently it's a no-op...

LATER use it, to check whether all required header-files are available,
in case pkg-config fails
--with-FOO-includes overrides PKG_FOO_CFLAGS

and the same for -libs

LATER: should we append the additional search/include paths to the PKG_FOO_*
rather than overwrite it?
GEM_CHECK_LIB now has an extra argument

(leave it blank for now)
proper use of AS_VAR_SET
check headers in GEM_CHECK_LIB
document usage of GEM_CHECK_LIB

and use plural for HEADERS parm
use new HEADERS for checking libglfw
check for headers (as fallback) with GEM_CHECK_LIB
include fribidi.h based on the header-check

rather than on the library check
use new GEM_CHECK_LIB features
updated ax_ macros
removed lib-prefix.m4

not needed any more (has it ever been needed?)
Updated pkg.m4
fix pkg.m4 by allowing some more patterns

PKG_FOO is used in messages.
PKG_FOO_PKG_ERRORS is used to store per-pkg errors (?)
use GEM_CHECK_LIB_* rather than PKG_* for aggregate flags
define HAVE_GEM_LIB_...
new m4-macros define HAVE_PTHREAD rather than HAVE_PTHREADS
use HAVE_PTHREAD as well as HAVE_PTHREADS
use $() rather than `` for stdout-results