Added setting the cursor ID, and a limit on the old test case to keep getting the expected result.
Rename mongo_get_limit to the more apt. php_mongo_get_next_request_limit.
Renamed mongo_util_cursor_failed to php_mongo_cursor_failed and moved to shared.
Implemented fetching batches from the cursor after the firstBatch.
Fetch the bashSize from the command structure.
Fixed crashes when the server would not return the expected results.

Basically we freed the data before using it in the exception.
Implement correct bson to zval for the cursor ID *only*.

We don't need MONGO_CURSOR_OPT_LONG_AS_OBJECT anymore, as that is implied by
MONGO_CURSOR_OPT_CMD_CURSOR anyway. We can therefore also get rid of
php_mongo_cursor_force_long_as_object. This commit also makes the conversion
options into a struct, which means we potentially can add options
(serialization to objects?) in there as well.
Added some extra checks for logic issues, and added the doQuery alias.

I've added the doQuery alias to rewind because it makes a lot more sense as a
name during manual iteration. While testing the manual iteration, I also found
that you could call next() without the query having been started, valid()
would return "stuff" when iteration hasn't started, now it returns false when
it hadn't, and finally made sure current() returns NULL and not true in case
there is no "current" element.
Rename parameter and updated the comment.
Fixed segfault in case options weren't being set or used.
Added a whole bunch of test cases.