Use $this->params insteand $app->getTemplate(true)->params at the templates

As requested (https://github.com/joomla/joomla-cms/pull/3782#discussion-diff-13786134) see here @bakual

old PR: https://github.com/joomla/joomla-cms/pull/3791
Merged without this changes and the same changes a bit later.