Refactored the templateExists method of the view listener

It now uses exists() method of the twig loader if it's an instance of
Twig_ExistsLoaderInterface.

Inspired by https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php#L120-L136