build: determine the plugin SONAMEs automatically
Most importantly, this avoids dlopening libcrypto.so, which is a symlink
in the OpenSSL development packages on Linux. Rather, we use the SONAME
of the first library added by pkg-config, which seems to work well across
the board. The strange case is NSS, which ends up using libssl3.so on
CentOS, Fedora and RedHat, but libnss3.so on Debian, FreeBSD and Ubuntu.
The tests pass regardless, so this might be tolerable.