### 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
'''Determines if a string looks like a template, by seeing if it
        contains a jinja2 start delimiter. Does not guarantee that the string
        is actually a template.
        This is different than ``is_template`` which is more strict.
        This method may return ``True`` on a string that is not templatable.
        Useful when guarding passing a string for templating, but when
        you want to allow the templating engine to make the final
        assessment which may result in ``TemplateSyntaxError``.
        '''
        env = self.environment
        if isinstance(data, string_types):
            for marker in (env.block_start_string, env.variable_start_string, env.comment_start_string):
                if marker in data:
                    return True
        return False
    def _convert_bare_variable(self, variable):
        '''
        Wraps a bare string, which may have an attribute portion (ie. foo.bar)
        in jinja2 variable braces so that it is evaluated properly.
        '''
        if isinstance(variable, string_types):
            contains_filters = "|" in variable
            first_part = variable.split("|")[0].split(".")[0].split("[")[0]
            if (contains_filters or first_part in self._available_variables) and self.environment.variable_start_string not in variable:
                return "%s%s%s" % (self.environment.variable_start_string, variable, self.environment.variable_end_string)
        
        
        return variable
    def _finalize(self, thing):