utils: add a function to validate a GUID string

(cherry picked from commit beef77403cd9d634b6ff6daa9f33d292e2d320a7)
generator: add a GUID parameter type

At the moment it is basically the change as String, and it is mapped as
if it was such.

(cherry picked from commit b10dd601fb07eb3d8bf76b5f9fcac1c7fe59d4d5)
generator: generate code for parameter validation

Implemented only in the C output, since every binding uses it anyway,
and just for the "GUID" type (since its format is well-known).

(cherry picked from commit 775cad63a3f2156b38e7d8360b88ed11615779e8)
actions/part_set_gpt_type: set type of "guid" parameter as "GUID" (RHBZ#1008417).

Switch the type of the "guid" parameter from "String" to "GUID"; this
adds the validation of the GUID as such, rejecting straight away invalid
GUIDs which otherwise could be handled badly by low-level tools (such as
sgdisk).

Add a couple of easy tests (taken from RHBZ#1008417) to
part_set_gpt_type about this.

(cherry picked from commit a948389ce9c76bf7e8997bb27f3daac06cb20c50)
list-filesystems: Do not segfault if guestfs_btrfs_subvolume_list returns an error (RHBZ#1064008).

If calling guestfs_list_filesystems with a disk image containing a
corrupt btrfs volume, the library would segfault.  There was a missing
check for a NULL return from guestfs_btrfs_subvolume_list.

This adds a check, returning the real error up through the stack and
out of guestfs_list_filesystems.

This is potentially a denial of service if processing disk images from
untrusted sources, but is not exploitable.

Thanks: Jeff Bastian for reporting the bug.
(cherry picked from commit d70ceb4cbea165c960710576efac5a5716055486)
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: Exclude iptables from the appliance (RHBZ#858648).
RHEL 7: Ignore /etc/release if /etc/redhat-release exists (RHBZ#873219).

If the user has created /etc/release on a RHEL machine, don't
mis-detect the OS as NetBSD.
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.