Fixes searches on Mongoid as broken by commit 003cdec.

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 adjust queries accordingly.
Merge pull request #24 from zarqman/fix_search_for_mongoid

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