Checking if extension is already loaded into the app container before loading it.

This is needed when you want to use middleware (ie. prerender some debug template before action) with some twig part inside. 

Original TwigServiceProvider is using this method for other extensions like security or url_generator.