Fixes erroneous misformatting of top-level $and/$or clauses

Top-level $and/$or clauses are surprisingly common when you're doing nontrivial queries from your app. Example:

```
{
    field: cond,
    $and: [condA, condB, condC]
}
```

Often there's no way to rewrite these subconditions as top-level conditions. They can be arbitrarily complex.

A simple check for $operators in the `convertToDB` helper function allows this to happen.