Implement interruption-free update and rollback

During an update, where a resource must be replaced in its entirety, create
the replacement resource before deleting the old resource.

Also, allow rollback to the previous version of the resource without
replacing it, where that is possible.

Fixes bug #1176142

Change-Id: Id89654bad297815bdbcc86f666367772889b5df4
Merge "Implement interruption-free update and rollback"