rtld: Add support for LD_LIBRARY_PATH_FDS env variable
This variable allows loading of shared libraries via directory descriptors
rather than via library paths. if LD_LIBRARY_PATH_FDS=3:4:12, the
directories represented by file descriptors 3, 4, and 12 will be searched
for shared libraries before the normal path-based mechanisms are used.
This allows the execution of unpriviledge binaries from within a Capsicum
sandbox even if they require shared libraries. Note that Capsicum is not
available on DragonFly yet.
While here, adjust whitespace and rearrange a bit to minimize differences
with FreeBSD rtld.
Taken from: FreeBSD svn 267678 (20 June 2014)