[#1208] Retry the discovery responder before declaring replication isolation (#1349)
## Problem
On the first reconnect after losing a replication session, the former
replication server can answer discovery and then refuse the elected TCP
connection. If the alternate discovery responder's start reply times
out, the broker declares isolation before retrying that server. With
`REJECT_ALL_UPDATES`, LDAP writes can receive result 53 until the next
reconnect.
[Failed Ubuntu / Java 17
job](https://github.com/OpenIdentityPlatform/OpenDJ/actions/runs/46264095245/job/141350054339#step:16)
## Change
Retry the alternate responder once on a start-reply timeout before
declaring isolation. Verify the generation ID in the successful reply.
Record a pending stop before it acquires the broker's start/stop lock so
a queued stop suppresses optional failover retries. The watchdog starts
when the stop is registered under the lock. With the bounded discovery
introduced in #1346, the broker checks again for a queued stop after
continued discovery and before opening a fallback connection.
## Validation
- The socket regression makes the former server answer discovery and
refuse the elected connection. The alternate responder withholds one
start reply. The test checks that the broker stays out of isolation
while the retry is pending, and verifies that the new session delivers
the missing change and a subsequent LDAP update.
- The new case reproduced premature isolation before the fix and passed
afterward.
- A second socket regression queues `stop()` while the responder
withholds its first start reply. It observed an extra start before the
fix. It now verifies that the responder receives one discovery probe and
one session start and that the stop completes.
- After rebasing onto `52694d4` (#1346), Maven `verify` ran 64 selected
integration tests on macOS with Java 17. All responder-retry and
queued-stop cases passed. Two existing tests failed in the combined run,
`aDisableEndsWhenTheReplicationServerGivesNoCredit` and
`theHeartbeatMonitorEndsAWriteToAReplicationServerWhichIsGone`. Both
passed in focused TestNG reruns with the base and rebased versions of
the broker and test fixture. `git diff --check` passed.
- A third [socket
regression](https://github.com/OpenIdentityPlatform/OpenDJ/blob/0727d7c93b408e2c93538065e6989fd58acdd017/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ReplicationBrokerStopTest.java#L1508-L1547)
holds the alternate responder's discovery reply until the broker enters
continued discovery. It queues `stop()`, waits for it to block on
`startStopLock`, and then releases the reply. The stop completes and the
alternate RS receives exactly one `ServerStartMsg` for discovery. With
the pending-stop check disabled at that point, the test fails because
the RS receives a second start message.
- With the new regression, Maven `verify` with the `precommit` profile
passed all 49 `ReplicationBrokerStopTest` cases on macOS with Java 17.
### CI follow-up
- Ubuntu / Java 21 timed out in
`RsaSveKeyTransportTestCase.testAnotherPrivateKeyCannotUnwrap` while
generating candidate RSA keys. The test now orders two 2048-bit pairs by
modulus and checks the specific unwrap error returned with the wrong
key. [Java 21 CI
log](https://github.com/OpenIdentityPlatform/OpenDJ/actions/runs/46397673932/job/141775831892#step:16)
- An earlier Ubuntu / Java 11 run failed in
`aDisableEndsWhenTheReplicationServerGivesNoCredit` on the remaining
offline announcement. Maven `verify` reproduced the old assertion
failure on Ubuntu / Java 11 with a seeded prior announcement whose CSN
sorts after the first update. The test now captures the announcement for
the current `disable()` at the first window probe and checks that it is
withdrawn, allowing the prior announcement to be restored. [Java 11 CI
log](https://github.com/OpenIdentityPlatform/OpenDJ/actions/runs/46382940305/job/141726375990#step:16)
- Focused TestNG runs passed all 45 `RsaSveKeyTransportTestCase` tests
on macOS / Java 21 and all 49 `ReplicationBrokerStopTest` tests on
Ubuntu / Java 11. `git diff --check` passed.
Follow-up to #1343. Related to #1208.