Add version comparison to salt.utils

This commit adds version comparison functions like those used for
comparing package versions, so that version comparison can be used
anywhere in salt. Generic version comparison is used, unless a cmp
function is passed to salt.utils.compare_versions.
Remove version comparison code from pkg_resource module

This code is no longer necessary, with the version comparison code moved
to salt.utils.
Replace references to pkg.compare with new func in salt.utils
Remove unnecessary comparison functions

These functions only pointed to functions within pkg_resource.py, which
have since been moved to salt.utils. Remove these as they are now
unneeded.
pkgutil: update pkg version comparison

This commit removes the old pkg version comparison functions, and
replaces calls to them with calls to the new function in salt.utils.
ebuild: update pkg version comparison, pep8 fixes

This commit removes the now-unnecessary "compare" function, and changes
perform_cmp to version_cmp, as well as replacing calls to them with
calls to the new function in salt.utils.

Also made a number of pep8 fixes.
apt: update pkg version comparison

This commit removes the now-unnecessary "compare" function, and changes
perform_cmp to version_cmp, as well as replacing calls to them with
calls to the new function in salt.utils.
Fix version specification in pip.installed states

This commit includes one fix and one enhancement:

1. Version specification is more intelligent now, and checks the
   currently-installed version against the desired version or version
   range.

2. Version specification properly overrides upgrade=True (fixes #5270).
Merge pull request #6574 from terminalmage/issue5270

Abstract version comparison and fix version specification in pip.installed states