mkosi-resize: rework and fix partition table recreation
mkosi-resize: rework and fix partition table recreation

This fixes the partition table so you can dd it to a device bigger than
the original image and have the partitions correctly sized afterwards.

lucasdemarchi/toolbox,lucasdemarchi/toolbox