[WIP][ticket/11649] Move construction of twig environment to DIC

This is WIP because it slows down the tests a lot. Need to investigate dumping the container for the test suite.

[PHPBB3-11649](http://tracker.phpbb.com/browse/PHPBB3-11651)