Remove extra from getCppType.

The argument is used for array type originally. We
now use hidl_array instead of T[], so there is no
need to use extra.

Renamed the convenience getCppType to getCppStackType
to avoid casting to (Type *) before using this
method (which makes it inconvenient)

Also fixes:
* RefType::getCppType ignores specifyNamespaces
* ConstantExpression.cpp emits a C-style cast instead
  of static_cast

Bug: 32559427

Test: mma passes
Test: hidl_test

Change-Id: I7e2e31c34c1ca1aa83c4a5a4dbdf7fd6b9aff30c
diff --git a/generateCppImpl.cpp b/generateCppImpl.cpp
index 6b5888c..bfd8950 100644
--- a/generateCppImpl.cpp
+++ b/generateCppImpl.cpp
@@ -67,9 +67,8 @@
     if (elidedReturn == nullptr) {
         out << "return Void();\n";
     } else {
-        std::string extra;
         out << "return "
-            << elidedReturn->type().getCppResultType(&extra)
+            << elidedReturn->type().getCppResultType()
             << " {};\n";
     }