Implement new algorithm for package_newer().
Implement new algorithm for package_newer().

This patch should bring more robustness to package version detection and
avoid false positives and false negatives that have been appearing.

parazyd/amprolla,parazyd/amprolla