Implement conversion of scripts
Fixes issue #396.  Make pkg version auto-update repo catalogue by default.
Add -U flag to pkg version to suppress this behaviour.
Fix typo.
D'Oh! -U turns *off* auto_update
Issue #396: Add REPO_AUTOUPDATE config variable, which sets the
default for the -L option to pkg upgrade, pkg install, pkg fetch or
the -U option to pkg version
Add missing commas.
Issue #396: Emit a relevant error message when EUID doesn't have
sufficient privilege to update repo.sqlite and that has been requested
(ie pkg version -R)
Issue #396: Update the usage message for pkg version
Issue #410: handle the case where left-over records are present in the
files table with no corresponding entry in the pkg table.
Fix license logic
Merge pull request #411 from xzhavilla/master

Fix license logic
Fixes issue #412 -- correct spelling of manipulate in pkg.8
New HTTP_MIRRORS option default to off

This feature has been requested for PCBSD mirror handling.
How it works:

PACKAGESITE: http://host/path

pkgng will fetch http://host
if fetch works the result is read looking for URL: http://newhost/newpath
the fetching http://host/path/pkg
will result into fetching http://newhost/newpath/path/pkg

While here add a new build time option to chose the default mirroring system via
the DEFAULT_MIRROR_TYPE value can be:
0: none
1: srv
2: http

Add a CFLAG to be able to define a hardcoded default packagesite at build time:
DEFAULT_PACKAGESITE (default to NULL)

Add a CFLAG to be able to change the default package audit url at build time:
DEFAULT_PORTAUDIT_URL (default to: http://portaudit.FreeBSD.org/auditfile.tbz)

To finish, only lookup once for the mirrors and protect looking up via mutext to
keep the library thread safe
Unify the mirroring type into one single option:

MIRROR_TYPE which can take the folloing arguments (case insensitive)
http: http mirroring
srv: srv mirroing
anythingbutprevious: no mirroring
Allow users to define the proxies via pkg.conf

pkg uses by default libfetch and thus inherit from the environnement variable
that libfetch supports.

However some users might want to be able to define them only for pkg, now they
can do it via pkg.conf
Fix a wrong warning from gcc on recent stable and current

Reported by:	peter@
Fix uninitialized warnings causing build failure
Do not activate DEBUG_FLAGS by default
Finish fixing gcc stupidity
Directly use calloc instead of malloc + memset