Pouchdb replication library w/ test...index html could stand cleaning up

I'm a little confused by this function. Why not just register a timer for the next iteration of a replication using setTimeOut and then have the function reschedule itself when it's setTimeOut code finishes? You can put in a check in the code in setTimeOut that looks to see if the associated replication is still alive. To do this would require giving each replication a unique GUID (to deal with situations where a replication is deleted and re-created) but that's easy to do (I have the GUID code) and would get rid of complicated methods like this one all together.

Thoughts?

Note: This is not a blocking issue.