Cache diff stats on patches to speed up computing combined diff stat of patch sets/campaigns
Created by: mrnugget
This fixes #10603 (closed) by adding nullable diff_stat_*
fields to the patches
table that are set when new patches are created (in which case we already parse the diff to validate it).
The cache is then used when computing the combined diff stat for a campaign or patch set.
Since these fields are new and we cannot migrate in pure SQL, they're nullable and we fall back to the old behavior in case they're not set.
That should not (frontend
loads all patches without the cached values, computes them and saves the patchees back to the database.