[FIX]mass mailing: performance issue on stats #469

This pull request optimize the statistics computation of the mass mailing campaign: instead of browsing each records all of the computation is done in one query.