hidl-gen: correct package paths in makefiles.

Previously, only IBase and the current package was added to package
paths whereas we want all paths which are required/inherited from.

Also uploadated tests.vendor to inherit something and be java
compatible.

Also fixed package root paths so that they are compared against the
beginning of a package instead of being anywhere in the package.

Bug: 34316257
Test: tests/vendor/1.0 update-base/makefiles, mma, hardware/interfaces
update-makefiles and mma

Change-Id: I9ef32b3867646690363fc9f85fe691ae74796d45
diff --git a/Coordinator.cpp b/Coordinator.cpp
index 11e24f8..5ff5381 100644
--- a/Coordinator.cpp
+++ b/Coordinator.cpp
@@ -20,6 +20,7 @@
 
 #include <algorithm>
 #include <android-base/logging.h>
+#include <hidl-util/StringHelper.h>
 #include <iterator>
 #include <dirent.h>
 #include <sys/stat.h>
@@ -167,7 +168,7 @@
     // there are multiple hits.
     auto it = mPackageRoots.begin();
     for (; it != mPackageRoots.end(); it++) {
-        if (fqName.package().find(*it) != std::string::npos) {
+        if (StringHelper::StartsWith(fqName.package(), *it)) {
             break;
         }
     }