SNodeReference instead of SNode for rule and template nodes used for logging.
Do not use log4j where own logger is available
templateNode is exposed via genContext, get public access to template's SNode back
Merge branch 'master' into 3.1/artem/default