When TEMPLATE_ROOT_WITH_PARTITIONS is set, include (GPT) partition table
and install actual OS on the first one. This allows installing grub, or
other bootloader.
FixesQubesOS/qubes-issues#2577
Linux loop driver support TRIM operation for some time (from 3.1
kernel), which is mapped to hole punch operation in underlying
filesystem (which must support it - ext* and xfs have it).
This is much faster and less space consuming than previous cp --sparse
method.
Split $DIST to distribution name and version (builder_setup script) and search
for scripts first $DIST-specific, but then for given distribution.
Also move out some Fedora-specific things to scripts_fc17.
If version mismatch, rpm --rebuilddb will complain about some files, but is
isn't critical, so just hide those messages. We still take care of exit code.