escape strings with `to_json` (close to groovy's)

This fixes errors like the following,
as well as the never-ending doubling of backslashes.

```
================================================================================
Error executing action `create` on resource 'jenkins_windows_slave[windows]'
================================================================================

Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '-1'
---- Begin output of "C:\java\jdk-1.6/bin/java" -jar "c:/chef/cache/jenkins-cli.jar" -s http://172.31.26.52:8080 -i "c:/chef/cache/jenkins-key" groovy C:/Users/ADMINI~1/AppData/Local/Temp/groovy20141229-2520-dkc2ak ----
STDOUT:
STDERR: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
RemoteClass: 9: unexpected char: '\' @ line 9, column 389.
   on-snapshots/',"JAVA_HOME":'C:\java\jdk-
                                 ^

1 error

    at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:302)
    at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:149)
```