[Templating] fix logic regarding template references and many phpdocs
minor #8927 [Templating] fix logic regarding template references and many phpdocs (Tobion)

This PR was squashed before being merged into the master branch (closes #8927).

Discussion
----------

[Templating] fix logic regarding template references and many phpdocs

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT

this clarifies the expected types and exceptions by much. and it fixes some logic flaws.
- missing info/methods in interfaces
- respecting Twig_LoaderInterface only accepting strings, not objects

related to fabpot/Twig#1183 but does not depend on it

Commits
-------

f6c12bd [Templating] fix logic regarding template references and many phpdocs