pkg-[r]query: Add %q to display architecture

Fixes #639
Directly build external components inside libpkg

That fixes arm and ia64 problems
Fix usage of getline
Fix more gcc warnings
Fix pkg add allowing to install package with missing dependencies
Do not try to escapt the string we receive for multiline like descriptions
Sync libucl 0.2.2
Workaround build issue on 8.3 and 8.4

This was fixed in base r227797

This was compiling the SRCS into external/libucl instead of into
external/libucl/src where OBJS was set for the objects.
Remove some libyaml warnings on dfly
Bundle properly libelf if not in base
Only redefine .c.o in FreeBSD
libelf/Makefile: Fix bundled elf makefile bug (typo?)
Fix bug that made pkg repo segfault

Introduced in 5dc36026fc60c64763d82a69ef2921b3cd78e913, pkg repo -l
crashed on packages (meta ports) that don't install files on their own.
Merge pull request #673 from grembo/master

Fix bug that made pkg repo segfault
Fix the debug output to show correctly whether it's a repo schema
upgrade or downgrade
Use MAX* cosistently

pkg used MAXPATHLEN, MAXLOGNAME and PATH_MAX inconsistently,
sometimes path[MAXPATHLEN] and sometimes path[MAXPATHLEN + 1].

Since those constants already include the trailing '\0' and snprintf's
size parameter also does, it was changed to path[MAXPATHLEN] (or
MAXLOGNAME, PATH_MAX) everywhere.
Where we use a fixed size char array as a buffer or as a member of a
structure, use the sizeof() operator later in the same scope when we
need to know the length of the array.

Fix calls to:

    snprintf(), pkg_snprintf()
    strlcpy()
    dn_expand()
Merge branch 'master' of git://github.com/grembo/pkg into grembo-master
Document the ALIAS keyword from pkg.conf

Fixes: #676
Be more verbose when parsing repositories configuration files

Do not fallback anymore on yaml for repository configuration files, it
should just be "normal" ucl given it is a new configuration file.

While here add some debug information when parsing a repository
Do no silently ignore unknown configuration entries.

Fix a double '/' in repository file path