Add bsearch_b to the libc map and the stdlib header.

bsearch_b is the Apple blocks enabled version of bsearch(3).
This was added to libc in Revision 264042 but the commit
missed the declaration required to make use of it.

While here move some other block-related functions to the
BSD_VISIBLE block as these are non-standard.

Phabric:	D638
Reviewed by:	theraven, wollman
Create a mechanism for looking up a device_t associated with an ofw/fdt
xref handle, and for registering that association.  Also use the same data
for faster translations between node and xref handles.

Now when fdt properties contain &othernode references, a driver can find
the device instance that corresponds to &othernode, and thus can use
interfaces provided by that instance.

Reviewed by:	nwhitehorn
Fix a bug where command line arguments could be misprocessed if getopts is
used prior to f_dialog_init() -- e.g., in a script that sets
DIALOG_SELF_INITIALIZE to NULL, preventing f_dialog_init() from being run
automaticaly when `dialog.subr' is included. Caused by sub-shell processing
of arguments inheriting prior value of $OPTIND, used by getopts. Solved by
unsetting OPTIND prior to [re-]processing of positional arguments.
The ocotp driver provides access to registers containing chip configuration
data that is needed by other drivers, so make it an EARLY_DRIVER_MODULE()
that loads before just about anything else.
The anatop driver controls power and PLLs and needs to be available before
just about anything else (other than octop which provides it config info),
so make it an EARLY_DRIVER_MODULE().
Create an interface for drivers to enable or disable their clocks as listed
in the clocks=<...> properties of their FDT data.  The clock properties
consist of 2-cell tuples, each containing a clock device node reference and
a clock number.  A clock device driver can register itself as providing
this interface, then other drivers can turn the FDT clock node reference
into the corresponding device_t so that they can use the interface to query
and manipulate their clocks.

This provides convenience functions to enable or disable all the clocks
listed in the properties for a device, so most drivers will be able to
manage their clocks with a single call to fdt_clock_enable_all(dev).
Add OF_xref_from_device() so that there's no need to have an intermediate
call to ofw_bus_get_node() to lookup info that's already in the xreflist.
Use OF_xref_from_device(), not OF_xref_from_node().  Also, use bzero()
rather than memset().
Fix typo.

Pointy hat:	ian
Merge remote-tracking branch 'freebsd/master' into hardened/current/segvguard