Add generic deserializer class.

Refs #1.
Add AmfArray deserialization.

Refs #1.
Fix index order of object reference tables.

While this doesn't handle circular references correctly yet, it at least gets
the reference index order right.