##### SUMMARY
There is no real reason that `UnsafeProxy` needs to exist.  

We need to add unsafe bytes support, and by doing so within `UnsafeProxy` over complicates matters.

`wrap_var` should effectively take over the work that `UnsafeProxy` is doing, and then just rely on `wrap_var` directly using the proper `AnsibleUnsafe*` classes. Or callers can directly use `AnsibleUnsafe*` themselves when `wrap_var` isn't necessary.

##### ISSUE TYPE
- Feature Idea

##### COMPONENT NAME
lib/ansible/utils/unsafe_proxy.py

##### ADDITIONAL INFORMATION
<!--- Describe how the feature would be used, why it is needed and what it would solve -->

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

```

<!--- HINT: You can also paste gist.github.com links for larger files -->

"""This function attempts to quickly detect whether a value is a jinja2
    template. To do so, we look for the first 2 matching jinja2 tokens for
    start and end delimiters.
    """
    found = None
    start = True
    comment = False
    d2 = jinja_env.preprocess(data)
    
    
    try:
        for token in jinja_env.lex(d2):
            if token[1] in JINJA2_BEGIN_TOKENS:
                if start and token[1] == 'comment_begin':
                    
                    comment = True
                start = False
                
                found = token[1].split('_')[0]
            elif token[1] in JINJA2_END_TOKENS:
                if token[1].split('_')[0] == found:
                    return True
                elif comment:
                    continue
                return False
    except TemplateSyntaxError:
        return False
    return False
def _count_newlines_from_end(in_str):