Fix sort() function

`sort({field:1})` does not work. `sortSyntax.coffee` handles the given data as an array even if it really is an object. The test added in this pull request does not pass currently but with the fix included it does.