pkg.removed and purged implements version comparison

One should be able to remove packages only if they match specified version.
Merge pull request #15543 from dr4Ke/pkg_removed_versions

pkg.removed and purged implements version comparison