Fix regression in apt

Not sure how this was missed, but pkg.compare no longer exists, as
package comparison was moved to a common function in salt.utils. This
commit fixes the regression and thus resolves #7624.
Merge pull request #7636 from terminalmage/issue7624

Fix regression in apt