Meson fixes
Some things spotted while comparing meson and autotools builds. Mainly some missing misc files in the install dir, and a proper list of exported symbol across the 3 libraries.
The fixes in tests/ solve some random underlinking I had with tests that poke internals.