Use a custom parser implementation instead of perflib.

Removes the dependency on perflib, avoids bugs in the perflib parser
whose fixes would not be readily available for ahat to use in the short
term, and avoids the need to pull in additional dependencies required to
use future versions of perflib.

Improves heap dump processing performance by 30-50% on some examples now
that we can avoid overheads due to the impedance mismatch between
perflib's object representation and ahat's object representation.

Other relevant changes included in this CL:
* Introduce enums for root types and basic types.
* Compute instance sizes on demand rather than eagerly.
* Introduce an abstraction for a collection of instances sorted by id.

Bug: 28312815
Bug: 33769446
Bug: 65356532
Test: m ahat-test, this change fixes all previously failing tests.
Change-Id: Ib14c294aa745cb03b02fa81d1544c78ff35e1edc
29 files changed