fixes #4672 - added template_name template variable

I would like to implement this handy feature in the community templates:

    %post
    snippet_if_exists("#{@template_name} Post")

Etc. Got snippet_if_exists function already, forgot to add template_name. Here
it is.

The community-templates change will come post 1.5 to give users some time to
migrate.
indentation's off