Queries should return models instead of documents, and model should be e...

...xtended with attributes

This pull request addresses two issues:

1. Running a query on a model class should return instances of that class instead of database documents.
2. We shouldn't have to go through a model's attributes object to access its properties.