libopkg: pkg_hash: prefer original packages to satisfy dependencies
When one package "provides" another non-virtual package, prefer to use
the original package instead of the providing package.
Example:
Consider packages "foo" and "bar", where "foo" provides "bar".
The current code will sort all candidates by name and use the last entry
by default, so "foo" would be used to satisfy a dependency on "bar".
Change the logic to prefer the actual package "bar" in this case.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>