### 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
)
            if not self.jinja2_native:
                unsafe = hasattr(result, '__UNSAFE__')
                if convert_data and not self._no_type_regex.match(variable):
                    
                    if (result.startswith("{") and not result.startswith(self.environment.variable_start_string)) or \
                            result.startswith("[") or result in ("True", "False"):
                        eval_results = safe_eval(result, include_exceptions=True)
                        if eval_results[1] is None:
                            result = eval_results[0]
                            if unsafe:
                                result = wrap_var(result)
                        
            
            
            
            if cache and only_one:
                self._cached_result[sha1_hash] = result
            return result
        elif is_sequence(variable):
            return [self.template(
                v,
                preserve_trailing_newlines=preserve_trailing_newlines,
                fail_on_undefined=fail_on_undefined,
                overrides=overrides,
                disable_lookups=disable_lookups,
            ) for v in variable]
        elif isinstance(variable, Mapping):
            d = {}