faster version of do_possible_mark_for_days_in_this_month()
Here is a patch for history_window.do_possible_mark_for_days_in_this_month() and logger.date_has_logs().
Instead of doing a select for each day on the whole logs table we copy in a temporary table all the interessants timestamps and make a select for each day of the month on that small table.
The opening of the history window is a little longer but this is MUCH faster (here at least) and doesn't use all the cpu for a long time like the actual version.
I don't really know how idle_add() work so if someone can check that I deactivate it correctly.