AidlConstantValue::Cast returns typed value

ValueString() squashes constant value into std::string, which is mostly
okay when generating code. But for Annotations, it's the AIDL compiler
which consumes param's values. Stringified values are difficult to
process. For example, there's duplicate logic to unquote stringified
string. (@JavaPassthrough, @Backing, @Description, ...)

Cast() returns typed value for AidlConstantValues. For example, we can
retrieve unquoted std::string from AidlContantValue::String() and
std::vector<T> from AidlConstantValue::Array().

Bug: none
Test: aidl_unittests
Change-Id: I8c350bfd999bcacd2dbbb0d5296b147eb469e216
3 files changed