Merge pull request #977 from kacfengine/master

Fix compile error.
Lots of fixes to package version comparisons and repository handling.

Too many fixes to count, but in general a lot of fixes on the sign of
comparisons (flipping less-than for greater-than, and vice versa), as
well as a lot of places where the comparison was reset wrongly.

Also made better verbose messages for package comparisons.

Fixes issue #3314, although a change to the update policy will still
be needed.
Merge branch 'master' of github.com:cfengine/core into upgrade_fixes

Conflicts:
	cf-agent/vercmp.c
	cf-agent/verify_packages.c
Merge pull request #978 from kacfengine/upgrade_fixes

Lots of fixes to package version comparisons and repository handling.
Fix leftover lessthan/greaterthan bug after 7c6e4939782.