Ensure the statistics are sorted

Sort the statistics by the period start date before
returning them, and restore the test that verifies
this behavior.

bug 1151345

Change-Id: I4f05ea049b7609cea9dab947738b7aabf3f062ef
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Merge "Ensure the statistics are sorted"