Fix for 1602 : removing root entries of domain cause replay of many changes
Before this fix, If one remove the root entry of a replication domain,
then stop the server The PersistentServerState is lost.
Therefore when later restarting the server all the changes from
the replication server are replayed on the database.
To avoid this the fix is simply to store the PersistentServerState to the configuration entry when the root entry does not exist.
I have not developed a unit test for this scenario because I believe that it is not possible to restart the server during the unit test.
I have done manual tests to check that the PersistentServerState
is correctly saved and reread.