[bplist] Rewrite the object parser to add cycle detection
This commit:
- Replaces valueAtOffset with objectAtIndex, which does boundary checks
- Replaces most uses of object offsets with object IDs
- Adds object IDs to most error messages
- Cleans up the dictionary and array deserializers
- Adds support for cycle detection; this can be optimized if necessary,
but as long as object graphs remain shallow should be performant
- Removes the full object table deserialization step; only objects
referred to directly by the root object will be deserialized.
- Introduces must/must2 to remove some error panics from
bplist_parser.go
Fixes #23.
3 files changed