Add util for dealing with locking in critical sections
Fix date test
Merge pull request #199 from dimagi/locking-utils

Add util for locking critical sections with 1..n keys