Cleanly stop replication at checkpoint time if no longer owner

This is a cherry-pick of:

https://github.com/cloudant/couch_replicator/commit/e5ef7c8a0ee2566b9cd4c02397ee94883d015fa0
2 files changed
tree: 0c91cff9a1bb48942c0141592ef6baa3db987b88
  1. priv/
  2. src/
  3. test/
  4. .gitignore