PHP-1245: Use php_mongocode_populate instead of a MONGO_METHOD.
Added missing return type.

Otherwise it defaults to int... and that's not what we want.
Merged pull request #790
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
PHP-953: Do not check custom or generated index name lengths

The 127-byte limit on index names is specific to mmapv1 storage. For both commands and legacy inserts (to system.indexes), we can rely on the server to validate the length accordingly.

Added tests for legacy inserts to ensure an exception is still thrown (albeit with a different message directly from the server).
Merge pull request #793
PHP-1229: Fix file/chunk deletion for GridFS::remove() and justOne

Previously, deleting a single file (with justOne) that was selected by some non-unique criteria could result in chunks from multiple files being deleted (because the initial files query was not limited).

Additionally, the final file deletion (after chunk removal) would re-use the original criteria. There is no guarantee that the same file would be matched in the second query, which could result in GridFS::remove() deleting file A's chunks but file B's file document.