Added support for wildcard characters in package version strings.

This is a potential fix for #12560, where a package with a wildcarded version will be installed, but then fail to verify afterwards. This way of implementing it means that wildcards cannot be combined with the comparison operators, but that doesn't seem to make much sense anyway. Tested on Ubuntu and Centos.