Prepare for multi-key fetch, iterate through the entire JSON and collect all cache keys, then resolve potentially cached references.
Fix: belongs_to inverse reference returns nil from materialize_json.
Combine json partials into a single JSON, cache key references in a local cache on iteration.
Preserve local cache across materializing of hashes and arrays.
Extended array, hash and mongoid_criteria to iterate using as_json_partial.
Updated HISTORY.
Materialize references in-place, don't copy.
Merge pull request #8 from dblock/multi-key-fetch

@macreery => Don't query cache twice for the same keys.