Add ENV variable and HTTP header triggers for tracing.
Re-enable Smarty when using Profiler Extension >= 1.2.2, always enable layer mode when using Profiler Extension >= 1.2.2