Refactor both PartitionWriter and VABCPartitionWriter am: e52b6cdc0b

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

Change-Id: If7889dd0eca9b3f344f65a344bbcf1f89fd21159