Consolidate container canonicalization logic

We need this same logic while piecing together C++ types because
we still have to reason about the type names used in AIDL.

Bug: 24470786
Test: unittests pass, integration tests pass

Change-Id: Ief2d531e1dace5e5e299f3aa246a870eb9c932c6
8 files changed