Consumption restore

commit by commit

depends on https://github.com/dimagi/casexml/pull/155