Initial implementation of the diagnostics dialog

The role of the diagnostics dialog is to group messages together and
avoid endless streams of modal error dialogs popping up.