Delegates added before and after the UI update dialog is shown

For now only when the modal dialog is shown, delegate methods are called before and after the popup notification for an insecure update is shown.

This PR adds also delegate methods for the update dialog itself. In this way it is possible for an application to know when the update dialog appears or gets closed. An application can respond to these events, e.g. hide / close widgets before the update dialog appears and can restore a previous state again afterwards. This was a valid use case for a client application and might be also of interest for others.