PHP-868: Make php_mongo_is_valid_id() static and use const arg