PHP-1231: PHP crashed when using selectCollection inside a Generator

https://jira.mongodb.org/browse/PHP-1231
Should we duplicate the name-checking logic that we have in `php_mongo_db_construct()`? Perhaps with a macro?

This would allow the function to return early and avoid fetching an alternate link (for some cases).

See also: comment near the bottom of this function in https://github.com/mongodb/mongo-php-driver/pull/738/files#r18479332