Check return values for php_mongodb_getcollection.
Rename variables in the same way as __get and do a null check for php_mongodb_selectcollection.
Check for NULL values here.

This simplifies checks in other places, and it makes sure we don't
inadvertently dtor NULL pointers.