Modify the aggregation logic to handle keys for subdocuments.
Merge pull request #29 from andrewryno/subdocument-aggregation

Modify the aggregation logic to handle keys for subdocuments.