Merge pull request #18 from dimagi/cz

more generalized attempt to fix race conditions
Merge branch 'master' into cz
abstract out quorum count