Fixes searches on Mongoid as broken by commit 003cdec / #21.

The API for where() when querying for multiple IDs differs between ActiveRecord and Mongoid. 
```
ActiveRecord: where(:id => [...])
Mongoid:      where(:id.in => [...])
```
This patch detects Mongoid and adjusts queries accordingly. Tested on Mongoid 4.0.0; should be valid for v3 and v2 as well.

This was broken by #21 (003cdecad55e55e32ed37842947d726b29d29a1d).