Make it possible for code to query the dynamic linker's default search path.

We're not going to have init(1) set LD_LIBRARY_PATH globally on 64-bit.
This patch makes it possible for libnativehelper to set LD_LIBRARY_PATH
in each Java VM (to support System.loadLibrary) without also hard-coding
the default search path there.

Change-Id: If13961fae976e06dd80d5ef522f31e8b7eb01154
Fix libdl build warnings, turn on -Werror.

Change-Id: I71c39b77ac1e9a92482ce71a829449100945ec86