Refactor template workflow again

Passing a variable around and using it to set the title didn’t work out.
Let’s try with only one cheerio call.

Also make pageinfo available on the page’s JavaScript as well.
Better Piwik <noscript> parameter generation