PHP-1245: Put MongoCursor::next in its own function, so we can use it in explain().

And add a basic test case for explain().
Merged pull request #791