Moves the code that checks for the cancel flag and starts
the replication to a separate method.

This method is then executed on the thread via the
performSelector:onThread method, which I think is the proper
way to do this. The performSelector:onThread sends a message
to the thread's RunLoop, which then dequeues the message
and executes the selector.

Temporary commit -- will be squashed into single commit for this PR.