PHP-1245: Split out MongoDBRef::get and MongoCollection::findOne into C functions