Added support for a "PreRun" action, on template invocation

Hi!
The idea is to allow calling an action (Action<ITemplate>) before running the template. This would be useful to setup special attributes and helpers on the template instance. 
Of course this would not work if used in isolation on an different AppDomain, I don't think would be easy to serialize that!
I added too some test for the non isolated version.
Thank you for your time and your project!!
Enrico