Rework, split and optimize repo functions.

pkg_repo.c - is a place for generic repo functions
pkg_repo_update.c - is a place for repo update code
pkg_repo_create.c - is a place for repo create functions

- All repo functions now have prefix `pkg_repo`.
- Doubly linked lists are used in repo create to speed up the process
Reduce warnings noise.
validate port origins by making sure they are listed in
the SUBDIR variable in the category Makefile.

Fixes #408
Add a -f option to 'pkg audit': use a local file as the vuln.xml
database.

Fixes #757 in master.  Will be in release 1.3.0
It's not true that I'm a time traveller visiting from the future.
start_process_worker() -- fork pkg(8).  Leave the child to carry on
and do whatever is required as normal.  However iff the child exits
with status EX_NEEDRESTART, fork again and replay the same process.
Rather than execve()'ing a second process when it is detected that pkg
needs to be re-run, fork the process early-on, let the forked child
run, and do whatever wrk is required and signal back to the parent by
setting its exit status if it needs to be restarted.

This allows restart of pkg(8) when used in a jail or chroot.

Fixes #746
Drop the last vestiges of support for 'infos' as a field in a package
manifest.  We still retain the capability to convert an old database
with a pkg.infos column into the current schema, where annotations are
used instead, but that's all.  An old format package manifest will new
generate an error.
chdir(2) to portsdir before attempting to run make(1) -- this avoids
problems if the current working directory has been deleted out from
underneath us.

Fixes #773
Set default manpage directory to $(prefix)/man
Add all the files generated by automake et all to .gitignore
Only for a child worker when not debugging.
Command line: pkg -d -- doesn't take an argument.  Fix for the
!HAVE_JAILS case.
Add new pkgdb_open_all() -- same as pkgdb_open(), but allows
specifying the pkg repository to use as the 'reponame' arg. If
'reponame' is NULL, is identical to pkgdb_open()

Similarly for pkgcli_update(), add a reponame argument which, if not
NULL, is the only repository whose catalogue will be updated.

Add '-r reponame' option to 'pkg update' allowing selective updating
of repositories.

Change the effect of '-r reponame' in 'pkg install', 'pkg upgrade',
'pkg search', 'pkg rquery' and 'pkg version' to use only the named
repository, and to use that repository even if it is marked active:no
in repo.conf.

Thus on a typically configured FreeBSD 10 box, 'pkg install -r FreeBSD pkg'
will upgrade pkg using only the package available from pkg.FreeBSd.org.

Fixes #738
Improve upgrade output.
Use more convenient output for jobs:

Issue:	#768
Reported by:	@larsengels
Improve output in `upgrade` and `install`.
Ignore slit-delete packages for displaying.
Use unified function to detect cached package name

Now cached file is defined by function `pkg_repo_cached_name` that gets
package and tries to find where in the cache it can be found.
Add workaround to not refetch all packages.