Pointer support and embedded types in HIDL.

* Pointers work per transaction. Don't work
  across transactions.
* ref<T> in HIDL translates to T const* in C++.
* No Java support.
* Embedded types like ref<vec<vec<int32_t>>>
  or vec<ref<T>> is supported. Pointers to
  pointers like ref<ref<ref<T>>> is supported.
* Array of pointers and pointer to array supported.
* Pointer inside a union is NOT supported.

Test: `mma`
Test: `make hidl_test && adb sync && adb shell hidl_test`
      Note that this only works with a kernel patch.

Bug: 31300815
Bug: 31349114

Change-Id: I15b74ca74a801009cc8bdc7132bd53d0185dbcbf
diff --git a/AST.h b/AST.h
index 4f1d373..46d3c0b 100644
--- a/AST.h
+++ b/AST.h
@@ -213,6 +213,15 @@
             Type::ErrorMode mode,
             bool addPrefixToName) const;
 
+    void emitCppResolveReferences(
+            Formatter &out,
+            const std::string &parcelObj,
+            bool parcelObjIsPointer,
+            const TypedVar *arg,
+            bool isReader,
+            Type::ErrorMode mode,
+            bool addPrefixToName) const;
+
     void emitJavaReaderWriter(
             Formatter &out,
             const std::string &parcelObj,