miscellaneous fixes to the replicator:

- monitor clients and make sure to remove the worker from the pool when
  needed
- prevent unexpected retry
- handle the case where the doc is missing
fix warnings