autotools: FreeBSD support

This patch adds FreeBSD and pkg-config support to configure.ac. The pkg-config support is somewhat dependent on https://github.com/strophe/libstrophe/pull/37, but degrades nicely to the original behavior.

Some of the code was re-used from https://github.com/strophe/libstrophe/pull/22.
Is `LIBS="$LIBS -lstrophe"` reuired here? AC_CHECK_LIB() should do this implicitly.