Add yaml_dquote() and yaml_squote() utilites; load them as Jinja filters...

....

When templating state files the variable contents may contain
characters that YAML will interpret specially.  Rather than try to
escape the special characters so that they are safe use a filter that
protects special characters in YAML values.