Check and fix messed up exports
This is patch set adds a (fairly rudimentary) test that compares the introspection data against what's actually available.
Before that it fixes a large amount of trouble the test discovered and prepares ground for hooking up the test into "make check" by cleaning up atrocious things in Makefiles.