PHP-868: Make php_mongo_is_valid_id() static and use const arg
PHP-868: Check string pointer and length in php_mongo_is_valid_id()