Add support for top-level $and queries

Support queries like '{$and: [{a: 1}, {b: 2}]}' which are valid MongoDB queries.