builder: Add CirrOS 0.3.1 disk image.

(cherry picked from commit 40b88fdbc76515fd21b33f54587c7f4f7b6e9715)
builder: Note in man page how to specify size in bytes.

(cherry picked from commit ac41f616db35921074a4909524b9bc1a2bd2406d)
builder: Pass ~prog global (program name) around.

(cherry picked from commit 3e802605b52dccd2574353d5aff220de8d8eb3b8)
mllib: Add library function to run external command and slurp up the output.

This also changes a couple of functions to use this new library
function.

(cherry picked from commit a403febb8c43bf573c2354c39df22a29cf8863d8)
builder: docs: Remove confusing reference to timezone.

(cherry picked from commit 1e1b027c1b7c592ae8f04bcef8ffe93b7f2841d4)
builder: List --install packages in the same order as on the command line.

Previously the list was reversed.  Note this doesn't have any effect
on how the packages are installed since the guest package manager
doesn't care about the order.

(cherry picked from commit 39bc959c5b3a972e9a12921e002f27aaab2cd5ff)
builder: Document that SELinux guests will reboot for autorelabel.

(cherry picked from commit a8c9aedd51a88b3e08d6cc2580053d44b11f716b)
builder/website: Add CirrOS signature file to EXTRA_DIST.

This fixes commit 40b88fdbc76515fd21b33f54587c7f4f7b6e9715.

(cherry picked from commit ed43cc12c4492510e38eee9c7f8a5076956e4066)
builder: Fix documentation for --attach option.

(cherry picked from commit 5fa55389d4a84a942010f8a77d305bc134deacf2)
builder: Minor documentation fix to manual page.

(cherry picked from commit 6879fdf98961bf7ef1610e5d131f1b494892bcdf)
builder: Add documentation for how to import images into OpenStack.

(cherry picked from commit 7c431d703005f7e08567be82caf035feca9b931f)
fuse: remove extra trailing \n in debug messages

debug() adds it already.

(cherry picked from commit 8bbd22d373e5189301c06c6f9e2dd1ae8b848b82)
fuse: clear stat structs (RHBZ#660687).

Not all the fields of struct stat are actually filled by us. This caused
rubbish to appear in the microseconds fields, which were then used as
base when changing atime/ctime (with e.g. touch), triggering EINVAL by
futimens/utimensat when those rubbish values were out of the range
allowed for microseconds.

(cherry picked from commit 99d6e2c84ef490feb6ff2e37e4b0684f34bac554)
fish: Fix tests that specified qcow2 format, but passed a raw format disk.

In some tests we were specifying qcow2 as the image format when adding
a disk, but actually passing a raw format image.

Libguestfs previously did not detect this until guestfs_launch, but it
was still a bug to pass an incorrect format to guestfs_add_drive_opts.

It only worked because these tests never call guestfs_launch.

A later commit in this series will cause this to be detected
(sometimes) during guestfs_add_drive_opts.

(cherry picked from commit 07e47513dfe77c0c038cc24e714a32fe096bc68f)
Use recommended timer settings for KVM (RHBZ#1053847).

See: https://bugzilla.redhat.com/show_bug.cgi?id=1053847#c0

Thanks: Cole Robinson, and several QEMU developers.

(cherry picked from commit b6ff6421686e6fd7e5f7db8eed24419c7bd09688)
tests/nbd: Move wait for qemu-nbd to start up earlier.

tests/nbd/test-nbd.pl contains a hack (a call to sleep) to wait
for qemu-nbd to start up in another process.

This sleep was previously located before the call to $g->launch()
since that is where (previous to commit 4a0f5ed382) the backend would
have connected to the NBD server.

However in the new code, an initial NBD connection test is done when
the drive is added (ie. $g->add_drive (..., protocol=>"nbd")), which
duly failed intermittently because the qemu-nbd server had not opened
its socket yet.

Move the wait earlier -- just after the fork -- to avoid this.

This updates commit 4a0f5ed38233393e75ea69ff0595936aed0e8abb.

(cherry picked from commit 3858eeb5171c0d6824c424e03a523e5686a98dfd)
test-tool: Use size_t instead of int for array index.

(cherry picked from commit 20514fec2507b22e06721c690d050173d097a1fc)
utils: Add utility function to copy string lists.

(cherry picked from commit 693a21513b8bf4c61aad76f1860d68f44d5e5e73)
utils: Add utility function to split string into list of strings.

(cherry picked from commit 89a617c07d83ac4517d62810c1eb597fa54a5d60)
utils: Add regression test for C utility functions.

(cherry picked from commit 815e739d1230ce067b6a09d644257dac031c0ddc)