lib: portage_util: Allow EBuild to take Path, use package_info parser

Allow the EBuild constructor to take os.PathLike in addition to
strings in __init__.  While I'm here, clean up duplicated
functionality with the package_info parser.

BUG=b:300285480
TEST=unit tests pass

Change-Id: If981577beb33ff256c9ed7300c20015882d478d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4864578
Tested-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
diff --git a/api/controller/packages.py b/api/controller/packages.py
index fea0d98..e866b2d 100644
--- a/api/controller/packages.py
+++ b/api/controller/packages.py
@@ -54,7 +54,7 @@
         cros_build_lib.Die(e)
 
     for path in modified_ebuilds:
-        output_proto.modified_ebuilds.add().path = path
+        output_proto.modified_ebuilds.add().path = str(path)
 
     for package in revved_packages:
         pkg_info = package_info.parse(package)