Ticket 48766 - Replication changelog can incorrectly skip over updates
Bug Description:
The changelog iterator uses a buffer to load and send changes, when the buffer is empty
there were scenarios when the straing point for reloading the buffer was incorrectly set
and changes were skipped
Fix Description: reworked clcach buffer code following design at
http://www.port389.org/docs/389ds/design/changelog-processing-in-repl-state-sending-updates.htmlhttps://fedorahosted.org/389/ticket/48766
Reviewed by: Mark and Thierry, thanks
(cherry picked from commit b08df71aa9eb18572f58e55e8d6b9ef7fe181773)
(cherry picked from commit ec15a75ccdba713e4d74dcd760e3244ba43b6191)