Connection::resolveServer(): refactor
Connection::resolveServer(): refactor

Also: use 4-arg connect() to make sure lambdas are disconnected
if the connection is gone.

QMatrixClient/libqmatrixclient,QMatrixClient/libqmatrixclient