Add template variables and allow config passing via URL hash

This contains two commits that build on each other (more detail in the commit messages):

- user-defined template variables that can be used in various widget text fields
- a mechanism for storing and retrieving the globalSettings (including vars) from/in the URL hash part