make case processing more transactional

**This is a request for input** and has not been sufficiently tested

acquire a lock for all case docs as they are fetched
and release all locks when complete