[PATCH v14 05/15] qemu_command: Separate domain memory building into a helper