Delete form fixes

reopening https://github.com/dimagi/commcare-hq/pull/2961 to fix issues with generating new GUIDs.