build: use a private libtool archive and base public library on that.

This allows us to strip symbols in our public ABI but still leave them
in for the purpose of unit tests. The tests simply link against the
private version of the library.

`make test` will run the abicheck.sh script for rudimentary ABI check.