Support non-Bson queries with explicit "$query" field. Fixes #648.

Note that this introduces a memory allocation in case of MongoCursor.sort() being used.