Enable the possibility to extends the twig environment
feature #307 Enable the possibility to extends the twig environment (nykopol)

This PR was squashed before being merged into the 2.3.x-dev branch (closes #307).

Discussion
----------

Enable the possibility to extends the twig environment

Q | A
------------ | -------------
Bug fix? | no
New feature? | yes
BC breaks? | no
Deprecations? | no
Fixed tickets | #208

This PR allow people who extends the generator for custom use to alter the twig environment.

For example, it will allow to add an extension :
```php
class MyGenerator extends Generator
{
   protected function getTwigEnvironment(){
      $twig = parent::getTwigEnvironment();
      $twig->addExtension( new MyTwigExtension() );
      return $twig;
   }
}

Commits
-------

5f6a4e5 Enable the possibility to extends the twig environment