Fix nested queries in MongoDB.

Refactor _translate_query from instance method to helper
Use explicit $and instead of implicit object AND
Add regression test