TemplateCompiler: Added support for var declaration inside template

Now it is possible to define intenal variables inside template using
{var ...} directive, for example:
{for var i = 0; i < _.length; i++}
{var item = _[i]; }
<p id="item-{:i}">{:item.name}: {:item.value}</p>
{end}