rtld: Sync with FreeBSD after gnu_hash import

For the most part, FreeBSD took our gnu_hash implementation without much
modification.  Most of these changes are caused by whitespace differences
due to a different style scheme, and by declarating variables separately
from their assignments.  Notable exceptions were:
* FreeBSD didn't use int_fast32_t type
* FreeBSD keeps checking the first character before doing strcmp
* FreeBSD renamed the symlook_obj2 to symlook_obj1_*

The only additions were two debug statements.  This commits syncs the
following back to DragonFly:

FreeBSD SVN 234840 (30 APR 2012)
FreeBSD SVN 234841 (30 APR 2012)
rtld: Add two special directives to libmap.conf

include <file>:
    Parse the contents of file before continuing with the current file.

includedir <dir>:
    Parse the contents of every file in dir that ends in .conf before
    continuing with the current file.

Any file or directory encountered while processing include or includedir
directives will be parsed exactly once, even if it is encountered multiple
times.

Taken from FreeBSD SVN 234851 (30 APR 2012) with modification:

1) DragonFly realpath works differently than FreeBSD's and doesn't
   accept a null value for the resolved_path argument.
2) FreeBSD's debug lines reflect the wrong function, lm_init, instead
   of lmc_parse_file.  lmc_parse_dir also calls lmc_parse_file, so
   the debug message is definitely wrong and was corrected.
3) FreeBSD keeps using path even after determining realpath and putting
   the result in the rpath variable.  It uses path for debug messages
   and opening a file descriptor.  DragonFly doesn't use path again and
   only uses rpath after it is determined.
4) FreeBSD's lmc_parse_file code had a bug in the linked list used to
   track which conf files had already been parsed.  Memory for the
   filename was allocated so it wouldn't get overwritten after multiple
   passes, which is standard for the includedir functionality.
mps(4): Use a variable.
kernel: Remove some unused variables.
kernel/crypto: Remove some unnecessary casts to the own type.
realpath(3): Upgrade to POSIX IEEE Std 1003.1-2008

Recent updates to realpath implements some of the missing POSIX
functionality, but the requirement to allocate memory for the pointer
returned by the function when a null pointer is passed to the
resolved_path argument was missing.

The prototype changes in the following ways:
1.  The restrict type qualifier is added to both arguments
2.  The second argument changes from "char resolved[PATH_MAX]" to
    "char * resolved"

The new prototype is backwards-compatible with the old one.

This should bring realpath up to Open Group Specifications Issue 7
IEEE Std 1003.1-2008
http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html

Taken from:
FreeBSD SVN 206893 (20 APR 2010)
FreeBSD SVN 206898 (20 APR 2010)
FreeBSD SVN 217144 (08 JAN 2011)
FreeBSD SVN 227090 (04 NOV 2011)
rtld: Utilize malloc capability of recently updated realpath

Now that DragonFly's realpath works like the FreeBSD version, rtld can
use the FreeBSD code without modification which is a little more
efficient.
Import amdsbwd(4) from FreeBSD

This is a device driver for the watchdog timer included in SB600
and more recent AMD south bridges.
Add a missing '-width' in various manpages' lists.
isa.4: List amdsbwd(4) and ichwd(4).
amdsbwd.4 & ichwd.4: Clean up SEE ALSO.

Also, bump the date to when it was brought in.
rtld(1): Add shared object search order to the man page

The shared library search order on the dynamic linker was updated a few
weeks ago, but the man page was not updated to reflect its new behavior.
DragonFly's search order is the same as Linux, but differs from FreeBSD
and other BSDs due to the recently added support for DT_RUNPATH and
-z nodefaultlib.

To clarify, FreeBSD and DragonFly *recognized* the DT_RUNPATH dynamic
tag but considered it an alias of DT_RPATH and thus wasn't handling the
tag as intended.

DragonFly is likely is the only BSD that searches shared objects like
Linux, but FreeBSD developers have patches from DragonFly in case they
want to follow suit.
arcmsr(4): Sync with FreeBSD.

Updates to 1.20.00.22

Some bugfixing (mainly, better timeout handling) and cleanups.
rtld.1: Some mdoc improvement.
pw:  Sync with FreeBSD

* Spelling fixes.
* Stop hard-coding default directory mode as 0777.
* Use arc4random_uniform() to avoid "modulo bias".
* Before updating the password database, the pw(8) utility first
  performs a sanity check by invoking "pwd_mkdb -C".  However, if this
  failed it silently returned success.  Fix this so it fails the update
  operation instead.
* Increase the size of the salt in pw(8) from 8 to 32.
* Make it possible to have a '/' in the salt.
* Add the groupmod '-d' option to pw to allow the deletion of existing
  users from a group without the need to perform the same operation by
  replacing the existing list via the '-M' option.  The '-M' option
  requires someone to fetch the existing members with pw, deleting the
  undesired members from the list and sending the altered list back.
* Do the right thing with symlinks in the skeleton directory.
* Accept passwords which contain whitespace.
* Introduce the new option -M to allow to set the permissions of the
  user's newly created home directory.
* Use strlcpy(3).
* Shift file locking to source file instead of temp file.
* Add a `-H <fd>' option that is like `-h <fd>', but accepts an already
  encrypted password on the specified file descriptor.

DragonFly-bug: <http://bugs.dragonflybsd.org/issue2362>
Obtained-from:  FreeBSD
development.7: Fix the git documentation URL.

Reported-by: Joachim de Groot <jdegroot@web.de>