pass schema when rewriting mongo ids
make sure any id's in queries get converted to mongo object ids
Merge pull request #132 from skrichten/object_ids_fix

ObjectID fixes