[FIXED JENKINS-7702] Tomcat sometimes defines a $JAVA_OPTS inappropriate for subprocesses.

Should fix the analogue of [JENKINS-7702](https://issues.jenkins-ci.org/browse/JENKINS-7702) for the Grails plugin. Probably need a similar fix for the Gradle plugin, and maybe even other plugins for other Java-related tools until the underlying [Tomcat bug](https://issues.apache.org/bugzilla/show_bug.cgi?id=54601) is addressed.