Add template resolution caching for faster rendering of simple templates

As an answer to the performance issue illustrated in the comments of #363, I propose to introduce caching at the resolver level too. This should probably be something that the default template resolver in groovy should do too.

Here is the result:

![perf](https://cloud.githubusercontent.com/assets/316357/3455592/36bc3e3a-01e4-11e4-9117-e75c798ea44a.png)