Remap String to alternate types when @utf8 or @utf8InCpp

Now, it is no longer sufficient to identify an AIDL type by its
package and class name, since the list of annotations is also
needed to uniquely identify the type.

Express this by mapping "@utf8InCpp String" to aidl-internal.Utf8InCppString
and then re-using existing mechanism to ask for a language specific
type given the canonical AIDL type string.
  - Adding another type variant and corresponding pointer (i.e. the way
    nullable and array work) would cause that type hierarchy to expand
    the number of ways we have to connect the types.
  - Passing a set of annotations through the type namespace adds
    syntactic cruft we can avoid by mapping annotations to special
    packages.
  - Adding special getters for "utf8 string type" expands the contract
    between the generic type namespace and the language specific type
    name spaces. Currently the only mechanism to get a type is to
    provide its canonical AIDL type.

Support @utf8InCpp in Java generation for the sake of unittests passing.
This type is identical to a normal string type (UTF16 on the wire).

Bug: 26729450
Test: unittests continue to pass

Change-Id: Ib017ce40ea01a50b50a157c0ef8b483a892b99b9
5 files changed