PHP-977: Regression test for cursor iteration within generator

https://jira.mongodb.org/browse/PHP-977