### Summary

`ansible.template.is_template` tries to loop until it determines if the value is indeed a template.  Which means we could loop extremely large strings, that don't even remotely look like templates, before we bail.

However, we could benefit from moving `Templar.is_possibly_template` to the global scope, and testing whether the value after `jinja_env.preprocess` is even possibly a template, before doing more computationally complex validation.

### Issue Type

Feature Idea

### Component Name

lib/ansible/template/__init__.py

### Additional Information

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)

```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
self._load_ansible_plugins()
        try:
            if not isinstance(key, string_types):
                raise ValueError('key must be a string')
            key = to_native(key)
            if '.' not in key:  
                func = self._delegatee.get(key)
                if func:
                    return func
                
                leaf_key = key
                key = 'ansible.builtin.' + key
            else:
                leaf_key = key.split('.')[-1]
            acr = AnsibleCollectionRef.try_parse_fqcr(key, self._dirname)
            if not acr:
                raise KeyError('invalid plugin name: {0}'.format(key))
            ts = _get_collection_metadata(acr.collection)
            
            
            routing_entry = ts.get('plugin_routing', {}).get(self._dirname, {}).get(leaf_key, {})
            deprecation_entry = routing_entry.get('deprecation')
            if deprecation_entry:
                warning_text = deprecation_entry.get('warning_text')
                removal_date = deprecation_entry.get('removal_date')
                removal_version = deprecation_entry.get('removal_version')
                if not warning_text: