Fix space caculation during deletion

Reported by:	gpfiefer
Fixes:		#509
New Release 1.1.0.b2
Be explicit about why a port is being reinstalled

That helps tracking down solver failures
Properly order the loading of options and deps

That makes the solver always finding the option in the same order and
this stop keeping proposing always and always the same package to
reinstall
Fix a typo in repo configuration
New Release 1.1.0.b3
Allow a package to only track a repository

Rework the API of annotations so that it only takes an origin.
Add a new pkg_annotation_lookup function
pkgdb_add_annotation does not need to be run in a transaction, which
also allows to reuse it in in the upgrade process.
Restore the repository annotation after an upgrade

To make sure a package is tracking a given repository:
pkg annotate -A mypkg repository <nameoftherepository>
Fix segfault on current

Reported by:	Nikolai Lifanov <lifanov@mail.lifanov.com>
Fix build
Add an function to return the number of repositories
Show the repository package will be installed from.
Nuke the pkg 'infos' stuff -- it's unused and obsoleted by pkg
annotate.
Nuke PKG_INFOS from orbit (it's the only way to be sure.)

'infos' is almost entirely unused, and is hereby deprecated.  Use pkg
attribute instead.

The 'infos' attribute field in struct pkg has been deleted.

The database schema for the packages table has been altered to remove
the infos column.  Any pre-existing 'infos' data will be converted into
a pkg annotation tagged as '_INFOS_'

YAML nodes tagged as 'infos' will be converted into pkg annotations
tagged by '_INFOS_' on input.  YAML nodes tagged as 'infos' will not
be emitted on output.

Drop the %i format code for pkg_printf()

Derive the number of attr fields in struct pkg automatically from the
pkg_attr enum.  Also, start counting the enum values from zero, as
they are used as array indices, and C arrays start from index zero.
This reduces the number attr fields in struct pkg by *two* as field 0
was never previously used.

TODO: drop 'infos' handling entirely from pkg manifest at the next
major version bmp.
Add %S as a new format code to print arbitrary character strings.
Add tests for %S
Add new pkg_vfprintf(3) function -- equivalent to vfprintf(3)
Add pkg_vprintf(3)
Make pkg_*_annotate() take a struct pkg*, as conceptually, that is
what it operates on.
pkg_printf()-ify some more verbs: annotate, lock, set

I want a pkg_printf()-ified version of warnx() too...
More pkg_printf()-ify