Add test for empty data in PeriodGroupedData

If an empty data array is passed to a query with a duration parameter,
currently we get a Python exception. This fixes that error.
Merge pull request #322 from alphagov/bugfix/add-test-for-empty-data-with-duration-parameter

Add test for empty data in PeriodGroupedData