[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.
I tried, and I found that it fails with:
```
Scripts not permitted to use staticField hudson.model.Result SUCCESS
```