Ensure KPIs fail gracefully for empty datasets.

If there is no data in a dataset, ensure the KPI modules
do not crash and burn. Also update tests.

Pivotal story: https://www.pivotaltracker.com/s/projects/911874/stories/68903848