ALM-701 simplify code for deleting couchdb documents