PHP-1286: MongoCollection::count() segfaults due to a double free.
Merged pull request #776