[config] fix auto::libffi to expand -L$(libdir)

pkg-config may store makefile macros. expand them if possible.
fixes GH #1082 with -L$(libdir) in the linkflags of libffi-3.1.pc
which broke auto::expext.

Also fix stylistic issues and document TEST_PKGCONFIG.