Update template incrementally as resources change

As a stack update progresses, maintain the contents of the template so that
they represent the current running state of the stack, instead of only
switching over wholesale at the end, so that if a failure occurs our state
and the template stored will be consistent.

Change-Id: If79e8b1dc212c548cad92fdbc340d61f5650f9d4
Implements: partial-blueprint update-failure-recovery
Closes-Bug: #1330016
Merge "Update template incrementally as resources change"