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

According to https://pypi.python.org/pypi/pytz, we shouldn't rely on setting tzinfo in a constructor or on a datetime object directly because it doesn't always work. Instead you should either (1) use localize on naive datetimes, or (2) use .astimezone() on datetimes with timezone set. The date test just started failing here because the dimagi utils tests are pulling in the latest version of pytz which seems to fail in this case while the previous version didn't.