Update hidl-gen for vts backend.

* Generate the type definition from all imported interface/types.
* Update the logic to generate a single profiler package for a hal
  package.
Test: make hidl-gen
Change-Id: I634c435af9913f74fa0e2495908a1805097649c4
diff --git a/AST.cpp b/AST.cpp
index 6467c4f..ab0e386 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -519,6 +519,14 @@
     importSet->insert(newSet.begin(), newSet.end());
 }
 
+void AST::getAllImportedNames(std::set<FQName> *allImportNames) const {
+    for (const auto& name : mImportedNames) {
+        allImportNames->insert(name);
+        AST *ast = mCoordinator->parse(name);
+        ast->getAllImportedNames(allImportNames);
+    }
+}
+
 bool AST::isJavaCompatible() const {
     std::string ifaceName;
     if (!AST::isInterface(&ifaceName)) {