Support complex queries on _id

Enables string IDs in array/object-based queries to be casted to ObjectID. Tests included for $in/$nin and $ne.

Update: Improved the tests. A change to the engine tests in Save is required for the mongo tests to pass reliably, will file a separate PR.