Use type-ids to refer to types instead of their names.

This is needed to handle ODR violations. Also add self_type fields.
Now each type will have a type-id allocated to it. Within a
translation unit, all types having the same fully qualified name have
the same type-id.

Test: header-abi-dumper -o example1.dump tests/input/example1.cpp -I
      tests -- -x c++ -std=c++11 -fno-delayed-template-parsing -I foo -isystem
      prebuilts/clang/host/linux-x86/clang-3289846/bin/../lib64/clang/3.8/include
      produces an sdump file while all exported type references
      satisfied.

Change-Id: Ic9d176422a2956c0490d0f19629893ee55d8a44f
12 files changed