app: keep track of number of errors and traces in GimpCriticalDialog.
We don't want an infinite number of traces because it takes some time to get. Until now I was keeping track of traces in app/errors.c, but that was very sucky because then I was limiting traces per session. Instead save them as a variable of a GimpCriticalDialog instance. Therefore only generate the traces for WARNING/CRITICAL at the last second, when calling the dialog. When too many traces are displayed, just fallback to just add error messages only. But then even errors without traces can be time-consuming (if you have dozens of thousands of errors in a few seconds, as I had the other day, updating the dialog for all of them would just freeze the whole application for a long time). So also keep track of errors as well and as last fallback, just send the remaining errors to the stderr.