make use of case query methods

depends on https://github.com/dimagi/casexml/pull/86