Add support for deferred dashboards.

This change allows scripted dashboards to return a jQuery Deferred
object, so that they can do extra queries as needed to generate the
dashboard.  For example, the dashboard could fetch extra data from a
REST service (like elasticsearch) and use the results to construct a
dynamic dashboard.