Optimize click registering speed #54484

SQL queries were widely suboptimal and lead, when data load became
important, to page rendering up to 12 seconds. This optimization cut
the rendering to ~4.5 seconds, which is better but still very slow. And
as data load keep increasing, it will keep getting slower.
Further optimization for click registering #54484

For all future newsletter we now use an additionnal argument to further
limit the scope of our SQL query. This drastically improve the speed
from ~4.5 seconds to 0.4 seconds. It's also much less sensible to huge
data load.