Timestamps in json representation of dataset

Create all_dates function on datasets.

Use it both for json representation of datasets and to show in templates (via timerange context variable)

This fixes #684 on github