Batch cdcr updates

It was originally made for the size of the batch to send.
I have simplified the code by using only BATCH_SIZE. In the scenario where there is only adds, it will use a buffer of BATCH_SIZE, if there are some delete, it will be split up into multiple batchs.
We can review what's the better logic later.