refactor the brokerlink connect() code

- so it actually ends after a few attempts to connect
- throw a proper exception when the attempts are exhausted

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1093646
Change-Id: I8875c0a19d61c5331a27c11bfa762177dd6a335b
Signed-off-by: Jiri Moskovcak <jmoskovc@redhat.com>