Fix 3 warnings about incorrect sizeof() usage in bzero() calls.
Merge branch 'master' of https://github.com/urbanserj/entente

This includes adding libev timer delays on auth failure.
Tidy code using indent.

This tidy run was done using 'indent -linux -l120 -nhnl main.c'. For
future runs you should drop the -nhnl argument.
Simplify cn2name().
Remove daemonizing() and use unistd's daemon().

Also do the daemonizing in main(), not start_ldap().
Further simplified cn2name() and did "indent -linux -l120".
Removed redundant bzero() calls after calloc(), which zero's for you.
Make bind failure delay use pam_fail_delay and pause other requests.

* Change bind failure response resultcode from "other" to
"invalidDNSyntax" or "invalidCredentials".

* Renamed bind failure delay related struct types and callbacks to be
more consistant.

* Tidied up auth_pam() and auth_pam_delay(), making them give back the
failure delay.

* Tidied up ldap_bind() and ldap_delay_cb(), making them stop/start
the connection watcher for the failure delay.
Fix memory leak in ldap_bind().
Refactor ldap_send() to handle closing the connection on errors.
Add 'tidy' make target to tidy code and used it to tidy code.

This uses indent and some followup sed scripts to tidy up userdefined
types. Unfortunately indent can't identify userdefined types without
specifying them with -T, which is impractical. Instead we use sed
regexes and identify types as anything starting with 'ev_' (as used by
libev) or ending with '_t' (as used by asn1c and many others).

Renamed existing *_data types to *_data_t to match existing type
naming conventions.
Use the libev 4.x API and tidy the import order a bit.

The 3.X API doesn't have an av_loop type, which our "tidy" make target
assumes does exist and removes the 'struct'.
Run 'make tidy' again.
Removed unnecessary OCTET_STRING alloc/free from ldap_bind().

Made ldap_bind() set the binddn in the BindResponse directly without
allocating/freeing a separate OCTET_STRING instance. This also
simplifies the delay handling a bit.
Tidy code, renaming and moving stuff.
Fix and simplify options settings, making -b and -l work.

* Removed environment ENTENTE_* settings to use popt arguments only.
Removed the #define BASEDN and made it use the -b option. Fixed the -l
option so it correctly binds to all ports when -l is not provided.

* Updated entente.defaults and entente.init.d to use options settings.
Added ENABLE=0 support so it can be disabled.

* Updated README.md to remove references to the removed ENTENTE_*
environment settings.
Improve README.md options description layout.
Add fail1() macro to do "perror(); return 1;" in lots of places.
Fix accept_cb to not leak file handles on malloc failures.
Rename ldap_bind()'s "response" back to "res".

The name "res" for the response message is a convention used
throughout the code.