Add template variables.

This adds a global settings option "Show template variables", which then
expands a pane allowing the user to define template variables to be
interpolated via the `{{varname}}` notation inside widget titles, graph
expressions, and frame URLs.
Allow encoding dashboard settings in the URL

This allows the URL hash to contain a Base64-encoded JSON object which is
read/written via Angular encoders/decoders. Currently, it is used by the
dashboard controller to read and merge `globalSettings` at page load, and to
store them back in the URL hash whenever `globalSettings` changes.