nested types: GenerateHeaderIncludes()

Visitor-based function gathers all include files for a header with
nested types.

However GenerateHeader() doesn't support nested types yet. Upcoming
changes will make it to generate class decl for each nested type
recursively.

Bug: 182508839
Test: aidl_unittests
Test: tests/golden_test.sh check
Change-Id: I2bb6b160a6a99fef7576c4c22f10e6015f3dc5c0
diff --git a/ast_cpp.cpp b/ast_cpp.cpp
index 39af24c..d490294 100644
--- a/ast_cpp.cpp
+++ b/ast_cpp.cpp
@@ -473,7 +473,9 @@
   for (const auto& include : include_list_) {
     to->Write("#include <%s>\n", include.c_str());
   }
-  to->Write("\n");
+  if (!include_list_.empty()) {
+    to->Write("\n");
+  }
 
   for (const auto& declaration : declarations_) {
     declaration->Write(to);