Sync with ^/head.
Add stubbed vhd.c for VHD support.
We don't need APM definitions here.
Add structure definitions for headers with related constants .
Implement vhd_resize(): we round to a multiple of the block size,
which is 4096 sectors per block or 2M bytes per block.
In vhd_write(), construct the footer and write it out. Next in line
is the dynamic header. After that, the block allocation table and
the actual blocks. It's for the blocks we need some infrastructure
support, because each data block is preceeded by a bitmap that tells
whether a sector in that block has been written, etc. The point is
that we interleave metadata with data and we don't have good support
functions for writing chunks of the image yet.
o   Avoid using strncpy(), as it will confuse Coverity. Use integrals for
    cookies and creator information. Just as meaningless; more cryptic.
o   Construct the dynamuc header and write it out.
Construct and write the BAT.
To allow testing of the code so far, scribble a bitmap before we write
the image. This won't work for images that need multiple blocks, because
each block starts with a sector bitmap, followed by 4096 sectors of user
data. But it works nicely for images that fit in a single block (and are
rounded to a block size.

With this commit, we can test if the Azura platform accepts our images.
Previous commit was premature in stating that we could test. The
file must have the footer at the end and we didn't write it yet.
With this commit we actually write the footer.
Let the testing begin.
Add image_copyout_region(). It allows a format to write chunks of
the image interleaved with metadata.
Add option -y for unit testing. When unit_testing is in effect, fields
that have different values for each run, such as UUIDs and timestamps,
will have a synthesized value. This allows us to compare images against
a known baseline without fails negatives.

Add mkimg_uuid() that wraps uuidgen() and provides synthesized values
for unit testing.
Use mkimg_uuid() instead of uuidgen().
Support unit testing:
o   use mkimg_uuid() instead of uuidgen().
o   Check unit_testing in vhd_timestamp() to synthesize a time.
Add vhd_geometry() to fill in the geometry in the footer. We respect
the command line arguments if possible, but otherwise implement the
algorithm from the specification.
Use image_copyout_region() to write 2MB of user data interleaved with
the block's sector bitmap. This should complete the support, modulo
bug fixing.
Fix vt(4) detection in kbdcontrol and vidcontrol

As sc(4) and vt(4) coexist and are both enabled in GENERIC, the existence
of a vt(4) sysctl is not sufficient to determine that vt(4) is in use.

Reported by:	Trond Endrestøl
Fixed build with DEVICE_POLLING.
Fix bug in sync control in new "dev" mode of ZVOL (r265678).

Don't check ZVOL_WCE flag, used in Solaris to control device "write cache".
It is not applicable on FreeBSD and by default set to "disable".

MFC after:	3 days
Fix r264346 for ia64. We need to allocate memory for the function
descriptors in order to relocate RTLD itself. To allocate memory,
we need the pagesizes array initialized, but that happens after
RTLD is relocated. This ordering is important for amd64, but it's
opposite of what ia64 needs. Handle this conflict with the define
called RTLD_INIT_PAGESIZES_EARLY. When defined, obtain the page
sizes before relocating rtld, otherwise do it after.