finish HKStatisticsViewController and reset function