Safe case update

depends on https://github.com/dimagi/casexml/pull/73 and (just for tests https://github.com/dimagi/hq-pact/pull/30)