Add extension twig now need instance instead of class name

We need to be able to add parameters in the constructor of the extension.