cleanup_crates: Refactor to use PackageInfo

FindPackageNameMatches now returns a PackageInfo object.
PackageInfos support comparisons using the portage version
comparison algorithm implemented in chromite, so they can
be sorted, etc, correctly, and without additional libraries.

BUG=b:187792048
TEST=None

Cq-Depend: chromium:3154283
Change-Id: Ica18b4d63413e5ee5393de67599b35603933cc5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/3154423
Tested-by: Alex Klein <saklein@chromium.org>
Reviewed-by: Allen Webb <allenwebb@google.com>
Commit-Queue: Alex Klein <saklein@chromium.org>
1 file changed