[JENKINS-25738] added getResult() as a whitelisted method

I created a fix for JENKINS-25738. The `getResult()` method will return the build's result as a string.
That would require a `Result` object to compare it to, which would require importing the hudson/jenkins models. Is that allowed in the Groovy Sandbox?