TE_SCALAR: add support for lowecase variable names

variables with lowercase names like: {version} or names like
{someVariableName} are now supported too.
Previously only names like {VERSION} were supported.
new option force_tpl_extension: port setForceTplExtension() to option('force_tpl_extension')
new option jail_to_template_path: port setJailToTemplatePath() to option('jail_to_template_path')
new option timing: port enableTiming() to option('timing')
Event handling: added a phase argument

events in the TemplateEngine work in three phases as follows:
 * TEEventPhase::evaluate:
   all event handlers registered for this phase are called in turn until
   the first one cancels the event(retrun false) or all have been processed.
   The changes that are performed as a result of this event have not yet
   occured. This event may be cancelled after your event handler has
   been called, which means that the changes may not be performed.
 * TEEventPhase::execute:
   in case no event hander in the evaluate phase cancelled the event,
   handlers in the execute phase do whatever whatever needs to be done.
   You are most likely not interested in this phase of the events.
 * TEEventPhase::inform:
   handlers in this phase are executed after the changes have been
   performed, this is the phase you are most likely instersted in.