EZP-20437 - Php Warning while clearing caches from console

Please refer to jira issue for complete information 
https://jira.ez.no/browse/EZP-20437

Briefly, what i think is that when cache is cleared, loadTemplate method can receive objects too. 

I decided to add a check for name being an string in our extended Twig_Environment. The parent class method phpdoc says $name param is a string, but i do believe that there are options where it can be an object too. 

Added an issue in twig repo too. 
https://github.com/fabpot/Twig/issues/992