Added Twig extension

Adds a Twig extension and Symfony2 support for it to the library.