Fixed bugs saving replication checkpoint

* Updating the checkpoint should not be canceled when the replication goes offline or is told to stop.
* The lastSequence stored in the db at the end should be the lastSequence saved remotely, _not_ the current lastSequence (which may have changed.)
* Added a Sync log message when the checkpoint is successfully saved, for future debugging.