The NetBSD libc tests use several definitions/macros that aren't available in
FreeBSD

Add the missing compat definitions/macros to lib/libnetbsd so the testcases
can be compiled with libnetbsd without having to invent ad hoc #define's, or
having to convert things over to FreeBSD idioms

Reviewed by: brooks
Phabric: D993
Sponsored by: EMC / Isilon Storage Division
Rename log2 to tal_log2.

Submitted by:	luigi
Revert r273481 so it can be recoded using fls(), which
some feel will make it more readable.
Clip the settings for the NFS rsize, wsize mount options
to a power of 2. For non-power of 2 settings, intermittent
page faults have been reported. Although the bug that causes
these page faults/crashes has not been identified, it does
not appear to occur when rsize, wsize is a power of 2.

Reported by:	tcberner@gmail.com
MFC after:	2 weeks
Avoid leaking data from the kernel environment: When we convert the
initial static environment to a dynamic one, zero the static environment
buffer, and zero individual values when kern_unsetenv and freeenv are
called.

Tested by:	kmoore (VM memory dump + grep)
Tested by:	cperciva (kernel panic dump + grep)
Fix some buglets in the error-handling of getdevice(). In particular, report
an error if the argument to pciconf -a doesn't have a unit number, rather
than triggering an assertion failure.

PR:		194506
Reported by:	Anthony Cornehl <accornehl@gmail.com>
Sponsored by:	EMC / Isilon Storage Division
Populate the GELI passphrase cache with the kern.geom.eli.passphrase
variable (if any) provided in the boot environment.  Unset it from
the kernel environment after doing this, so that the passphrase is
no longer present in kernel memory once we enter userland.

This will make it possible to provide a GELI passphrase via the boot
loader; FreeBSD's loader does not yet do this, but GRUB (and PCBSD)
will have support for this soon.

Tested by:	kmoore