WFLY-3468 handle reconnection failing by re-trying several times

Initial version of a patch which works for me to solve this, at least against the reproduction steps I posted on WFLY-3468.

It should probably use proper logging messages rather then a hard-coded message printed to System.err. Most of the logging messages have disappeared from WF-core after the split - should I add a new Messages file to the server project, or add a new message to one of the existing ones?
This style of indentation is almost unreadable to me, please do:

    for () {
        try {
        } catch (...) {
        }
    }