Improved integration with Groovy 2.3.1

Groovy 2.3.1 has a new template loader abstraction that handles
compiler caching (better performance by factor of 10).
Make Groovy templates work with Groovy 2.2

Fixes gh-890