Add Apache license header back to libpqueue files

The original libpqueue file were licensed under Apache 2.0 so
therefore should retain their copyrights and header as per the
license terms at http://www.apache.org/licenses/LICENSE-2.0
Add full license notice to bsearch code

The original BSD glibc code contains the notice as given at
http://opensource.apple.com/source/gcc/gcc-5666.3/libiberty/bsearch.c
and should be given in full along with the code.
Give proper license notice to code from Android

The usage of the Android derrived code contains a full notice
which must be provided with the source code as per the terms
given at:
https://android.googlesource.com/platform/bionic/+/android-4.0.3_r1.1/libc/bionic/dirname_r.c