[#97] Compare each batch with the previous one

* Stop the sync process once we stop getting new data
* Store Record IDs in a Set