EWS: fix crash when autodisovery or connection fails
Closing or rejecting the progress dialog emits the rejected() signal, which lead to a null-pointer dereferce as the dialog has already been deleted by the finished() slot.
This change in general cleans up handling of the result of autodiscovery and connection test.