updating TwigExtension class with constructor and dependencies;
the reason is to make use of overridden urlFor method in the application and twig templates, and get fid of static application instance call;