tools: Check for dangling --format parameters (RHBZ#1140894).

In most C tools, virt-sysprep and virt-customize, you have to put the
--format parameter before the corresponding -a parameter.  ie.  The
following is correct:

  guestfish --format qcow2 -a disk1 -a disk2

But the following is incorrect.  The --format parameter is dangling
and prior to this commit would have been silently ignored:

  guestfish -a disk1 -a disk2 --format qcow2

After this change, dangling --format parameters now lead to an error:

  guestfish: --format parameter must appear before -a parameter

In virt-customize, also check that --attach-format parameter appears
before --attach parameter.

Thanks: Lingfei Kong
v2v: Introduce Types.mpstats struct storing mountpoint statistics.

This is just code refactoring.
v2v: Estimate the amount of space required on the target.

Estimate the amount of space required on the target by each source
disk after conversion.  The estimate is approximately a ceiling on
this, and actual use should be considerably lower.

Provide an extra output method (#check_target_free_space) which output
modules may use to check that there is sufficient free space to
proceed, before conversion starts.  None of the output modules
actually implement this at the moment.
v2v: Fix variable name usage_mb -> usage_gb.

It's actually storing usage in gigabytes, not megabytes.
v2v: -o rhev/vdsm: In --no-copy case, use estimate for ovf:actual_size (RHBZ#1140156).
appliance: Add comment with udev debugging option.
daemon: Run udev_settle after pwrite-device finishes (RHBZ#1141451).

When you call close on any block device, udev kicks off a rule which
runs blkid to reexamine the device.  We need to wait for this rule to
finish running since it holds the device open and can cause other
operations to fail, notably mkfs.

(cherry picked from commit a9c8123c72db47bcab8dd738e8d5256a9ae87f11)
Version 1.27.45.
RHEL 7: Emphasize libguestfs-winsupport package (RHBZ#627468).

This RHEL-only patch changes the error messages when the
inspection code cannot find an operating system inside the guest
image.  For a Windows guest this may happen because the user has not
installed the separate 'libguestfs-winsupport' package.  Therefore we
emphasize that the user may need to install this package.

Notes:

(1) In RHEL there are two pieces of inspection code, the old Perl code
(deprecated upstream) and the new C core inspection API.  Therefore
this patch has to touch two places with essentially the same change.

(2) This patch doesn't try to be clever and detect if it was a Windows
guest.  This should reduce the chance of failure.

Output from (Perl) virt-inspector now looks like this:

 $ virt-inspector disk.img
 No operating system could be detected inside this disk image.

 This may be because the file is not a disk image, or is not a virtual machine
 image, or because the OS type is not understood by virt-inspector.

 If you feel this is an error, please file a bug report including as much
 information about the disk image as possible.

 RHEL notice
 -------------
 libguestfs will return this error for Microsoft Windows guests if the
 separate 'libguestfs-winsupport' package is not installed. If the
 guest is running Microsoft Windows, please try again after installing
 'libguestfs-winsupport'.

Output from guestfish (ie. C core inspection API) now looks like this:

 $ guestfish -i disk.img
 guestfish: no operating system was found on this disk

 RHEL notice
 -------------
 libguestfs will return this error for Microsoft Windows guests if the
 separate 'libguestfs-winsupport' package is not installed. If the
 guest is running Microsoft Windows, please try again after installing
 'libguestfs-winsupport'.
RHEL 7: Remove libguestfs live (RHBZ#798980).

This isn't supported in RHEL 7.
RHEL 7: Remove 9p APIs from RHEL (RHBZ#921710).
RHEL 7: Disable unsupported remote drive protocols (RHBZ#962113).

This disables support for unsupported remote drive protocols:

 * ftp
 * ftps
 * http
 * https
 * tftp
 * gluster
 * iscsi
 * rbd
 * sheepdog
 * ssh

Note 'nbd' is not disabled, and of course 'file' works.

We hope to gradually add some of these back over the lifetime of RHEL 7.