Adding test and patch for updating only fields that has changed in Model::save().
Refactoring MongoDb operators; adding docblock.

- extract() should be avoided if possible. As it makes
  the origin of variables intransparent.

- Reducing line count and amount of temporary variables.

- Fixing coding standard violation.
Fixing expectException usage.
Merge pull request #1121 from koushki/bug/entityfix

Model::save() should only save updated fields
Documenting; formatting.
Adding test to prove #1099.
Fix Database queryExport issue with related model's conditions
Filter conditions on subsequent relation queries.

Refactoring _queryExport().
Adding more information to docblock.