Consolidate type checking logic

Move logic used to check types used in AIDL into a common superclass
of the language specific type namespaces.  Add a templated
LanguageTypeNamespace class to allow language specific type reasoning
while sharing an implementation.

Move functionality important to the the AIDL type checking into
ValidatableType and out of the Java and C++ subclasses.

Removed GenericType from the Java type system because it messed around
with the canonical name for a type post construction, while adding
absolutely no value of its own.

Bug: 24470786
Test: unittests continue to pass, full build of android succeeds.

Change-Id: Ic03eb5d770c7f51abbde87c20a9b7287ce6a277e
diff --git a/ast_java_unittest.cpp b/ast_java_unittest.cpp
index 2b52226..7c09684 100644
--- a/ast_java_unittest.cpp
+++ b/ast_java_unittest.cpp
@@ -38,8 +38,10 @@
 
 TEST(AstJavaTests, GeneratesClass) {
   JavaTypeNamespace types;
-  Type class_type(&types, "TestClass", Type::GENERATED, false, false);
-  Type extend_type(&types, "SuperClass", Type::BUILT_IN, false, false);
+  Type class_type(&types, "TestClass", ValidatableType::KIND_GENERATED,
+                  false, false);
+  Type extend_type(&types, "SuperClass", ValidatableType::KIND_BUILT_IN,
+                   false, false);
   Class a_class;
   a_class.comment = "// class comment";
   a_class.modifiers = FINAL;