Fix 2911 - dsreplication pre/post-external initialisation fails to clear all the changelogs
The following changes fixes the fact that the 'server-state' information, visible under cn=monitor, is erroneous (not updated) when an OpenDS instance starts and there were some changes done on the topology while
this server was stopped. This bug can always be seen when running the scenario to reproduce #Issue 2911.
This issue comes from the fact that, at start time, the main thread creates and start the ReplicationDomain thread, that itself creates and starts the replication listener threads.
Then the listener thread start receiving some updates, and the replay thread start replaying them.
While, with a race condition, in the main thread, the multimaster replication registers the post op plugin of the replication.
So the first operations are successfully replayed but the necessary replication post op plugin is not called by the core server and the server-state is not updated.
To fix properly that issue, we need to wait for the Replication Master Synchro provider to be successfully registered in the core, before starting listening for the replication updates. So a new method called
'completeSynchronizationProvider()' (any better proposal is welcome) is added to the SynchronizationProvider API for that purpose.
A side effect is that a ReplicationDomain must now be started after creation. Some replication tests, that create ReplicationDomain on the fly, are also fixed here.