Lib fixes

Add some fixes so that the library passes all of the tests from https://github.com/Akkroo/MongoQueryTests/commit/60ca2ba1543fd738e46e43c9f60c8563271f329a. Once the JSON fixes are merged (https://github.com/Akkroo/MongoQueryTests/pull/1), I can update the MongoQueryTests submodule.

This pull request does not include the changes (https://github.com/Akkroo/JSMongoQuery/pull/1) that allow the tests  to run, but I will update that pull request with these fixes when we have decided the best way to include the vendor libraries for running the tests.