Fix Delete Cases/Save bug

Saving immediately after deleting cases could fail, as the code was attempting to save cases that had been destroyed. First, we call commitRecords after deleting the cases, which causes the SproutCore store to flush all pending changes. Second, the saving code checks the status of each record and skips any records that have been destroyed.

apps/dg/controllers/data_context.js [ In doDeleteCases(), call commitRecords() to synchronize the store after deleting the cases. ]

apps/dg/models/dg_record.js [ In the toArchive() method's prepareRelationForArchiving() function, don't archive any records that have been destroyed or are in the process of being destroyed. ]
Build 0221
Merge branch 'kcpt-codap/master'