config.m4: rewrite, search for library and headers

The old code only tried to find the header file, but we need both the
library check and the header file. Make sure the header file is found
even when it's in obscure /usr/include/samba-* directories.

Do the shared library lookup in the standard PHP way (gleaned from
several other extensions) to avoid actually using paths and filenames
for the shared library (not portable).

Try to do something sensible with the DIR argument to
--with-libsmbclient=DIR: if not given, the system libraries are used,
else the script expects the library to be in DIR/lib, and the headers in
DIR/include. It's then up to the administrator to make that work.
README.md: make file-reading example binary safe

The old file-reading example did not correctly check the loop
terminating condition; the correct check is whether the data is false or
the zero string. The old loop would also exit on "falsy" data, such as
the string "0".
Bump version number to 0.5.0