Replaced redundant dependency sorting code with a simpler implementation.

This fixes the issue found by "xbps-src bootstrap" when a package
without "provides" was declared as a virtual package.