Avoid clobbering {system_,}metadata dicts passed to instance update

Right now, the dicts for metadata items passed to instance_update
methods will get clobbered as part of the save. This patch makes
a copy before doing the update to avoid this.

Change-Id: I546692779a7467c5cb309059bb46a9bc9b62d5f1
(cherry picked from commit bbe2c5f08f52b1080a857a7e59c227587aa89717)
Merge "Avoid clobbering {system_,}metadata dicts passed to instance update" into stable/havana