Move partition writer to a separate file am: 50bac6567e

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

Change-Id: If1744ccab7e5fc28561061a49a252fc35197a5f5