Prevent duplicate changelog cursors during replica publication (#1352)
A domain cursor could discover a new replica database in its initial
scan and then receive a second notification when the writer finished
publishing that same database. If the reader had already consumed a
change, it could replay it. If both cursors reached the same change
together, one could remain open at shutdown.
`FileChangelogDB` now uses the same per-domain lock for publishing a
replica and for scanning and registering a new reader. A reader that
starts before publication receives the notification. A reader that
starts afterwards discovers the replica in its initial scan and uses its
requested starting CSN.
The regression test opens a reader during publication and verifies that
it reads the change exactly once. It fails on the parent commit and
passes with this change. A separate local reproduction produced
`msgID=269` with one cursor still open on the parent commit and zero
open cursors with the fix.
The [combined scale-empty run on
#1341](https://github.com/OpenIdentityPlatform/OpenDJ/actions/runs/46504297800/job/142249558104)
reported the same shutdown error. Its artifact records the log path and
cursor count. The identity of the reader in that run remains unknown.
Maven verification passed with 141 changelog tests across six test
classes. The original Docker convergence scenario is covered by CI.