Make statistics tasks smarter and only calculate diff for the last day.

This avoids "since the beginning of time" queries. It does rely on tasks for
yesterday to succeed and have an uninterrupted sequence of results.