Initial checksums API.
Add braces around long block
pkg_repo_fetch_package: Don't try symlinking if path is not set in cases where the file already existed
autoremove: Fix handling of query_yesno response
Add basic logic of hashing.
rquery -I: Add all expected output and simplify by using pkg_printf(3)

Reported by:	dteske
Add encodings.
Implement the rest of pkg_checksum.
Store digest format in meta file.
Reject old digests.
Allow getting the size of specific digest.
Fix digest update function.
Calculate pkg digest in pkg_checksum.c
Add olddigest field.
Fix upgrade script for repos.
Special support for pkg 1.2 repos.
Improve debug message.
Do not crash on package without reponame.
Merge pull request #817 from vstakhov/pkg-checksum

Pkg checksums rework.

A quick summary of the digests changes:

- checksums now contain version and digests_suite id which includes hashing and encoding functions
- all checksums operations are now in `pkg_checksum.c`
- checksums type can now be found in repo `meta`
- if a checksum is in a wrong format, `pkg` tries to upgrade it
- a compatibility layer for pkg 1.2 repos has been added
Fix empty digests.

Reported by:	az