Added a couple more indexes on the statistic tables

Having an index by date means that we can quickly delete the old rows
Fix for huge per-day statistics table on production

When deleting rows from this table, we only delete 1 month at a time
to work around mysql killing the query.