refactor due list code to be more testable
Merge pull request #65 from dimagi/cz

refactor due list code to be more testable