Add GremlinGroovyScriptEngine code.

This is basically the same as the previous implementation in 2.x.