Implement the functions in CowMergeOperations am: 87af6c083d

Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1395670

Change-Id: Ia630d94c39fdf33bf759d4ab4903c943c6d68f8a