[#1303] Wait for both sides of replication initialization (#1304)
## Problem
The replication initialization tests check the exporter's
remaining-entry counter as soon as the importer has received all bytes.
The exporter can publish the complete entry message before updating its
counter, so the test can observe all 5,000 entries and still read 5,000
remaining.
## Changes
- Wait for successful completion of both the importer and the exporter,
and record each counter on the thread that updates it before its context
is released. Retain the data and import/export direction checks, and
reject an unexpected import retry.
- Exercise the reported interleaving across two replication servers by
holding the exporter after it publishes the entry message. Also hold the
export result after the import succeeds to verify that the check waits
for both sides.
- Verify that an import failure after receiving the data cannot be
reported as a successful transfer.
Fixes #1303
## Validation
- `ReplicationDomainTest`: 42 tests passed on Java 21, with no failures
or skips.
- The controlled interleaving reproduced the original `expected [0] but
found [5000]` failure before the fix. Removing the exporter-completion
wait made the new test fail at its second synchronization point.
- `git diff --check` passed.