Fix build with clang on 8.3

This explicitly links to libarchive since libarchive is explicitly
called
Schema changes in order to support both shlibs provided & required
Update libpkg API to access both shlibs_required and shlibs_provided.
Add the machinery to record the shlibs provided by a package
Add support for shlib providers to pkg-shlib
Avoid analysing symbolic links for shared library usage -- previous
code would analyse the file the sym-link pointed to.
Avoid trying to close a file descriptor that was never opened
Add support for displaying info about shared libs provided by packages
as well as those required by packages.
Add support for querying provided shared libraries to pkg query and
rquery

Fixes #306
Improve message about incompatible ABIs found in repositories

Suggested by:	kientzle@
Fix logical inversion, add missing space to error message.
Distinct the bad ABIs
Link against all needed libaries since binutils may not recursively add them
Use libbsdyml is exists instead of bundled libyaml

Conflicts:
	libpkg/Makefile
	libpkg/pkg_ports.c
SRV_MIRRORS was reworked to MIRROR_TYPE in fac3243e
Fix ABI support in PACKAGESITE causing assertion

pkg: pkg_init() must be called before pkg_config_int64()

This must be called after 'parsed' is true since it accesses
ABI from the config.
Default MIRROR_TYPE should be (1) for SRV since the default PACKAGSITE requires SRV

Broken since dc9e2406
Fix SRV mirroring support not actually looking up SRV record

Broken since dc9e2406