Make TestRunReplicationWithError and TestGetReplicator pass

- Use MockHttpClientFactory in TestRunReplicationWithError
- Fix TestGetReplicator by adding sleep for one second to wait for all statuses to get updated after calling replicator.Stop() method
- Fix Replicator not calling complete handler when the task gets cancelled which causes AsyncTaskCount not getting updated.
- Fix AsyncTaskStarted() method that UpdateActive() not getting called.