Ubuntu: fix issues with showing connection errors

Implements opening a dialog when there is either an imap or network
error

BUG: 332870
REVIEW: 117307

Also implemented imapAlertReceived to display message in dialog popup