Add dashboard_(pre)header hooks to normal dashboard view

The dashboard view will call helpers on the Sinatra app,
dashboard_preheader and dashboard_header, before and after
the page's header, respectively. By default, they are empty.
Add a couple helpers to the Sinatra app

* current_top_level: returns a GDash object representing the current
  category; this way, client code doesn't have to know about how to
  fetch the category name from the request parameters
* url_to_dashboard: return a URL to a dashboard for an arbitrary
  category and dashboard name with optional time parameters, maintaining
  the query string

These helpers are primarily for the benefit of the dashboard
(pre)header hooks.
Add support for query parameters to uri_to_dashboard app helper

It will merge the supplied parameters into the page's current parameters.
Add a graph_caption to the regular dashboard powered by an app helper

The default implementation returns an empty string by default, but it
can be overridden in subclasses.