Wrap groovy script exceptions in a serializable Exception object

Fixes #6598

It prevents ES from trying to serialize the default Groovy exceptions, which want to carry over a lot of state that doesn't  serialize properly.
the script name is going to be "Script1.groovy", "Script2.groovy", "Script3.groovy", is that actually helpful?