Close connection on update_event error for new cmd

Issue 261. If an update_event fails for case conn_new_cmd but no
more events happen on this socket, conn_closing will never be
processed.

Not sure if it's possible for this to happen, but it could
theoretically leak refcounts.
Create memcached pid file atomically using rename.

This change avoids a race condition where another application (e.g., testapp)
can read the memcached pid file after memcached opens it, but before
memcached writes the pid. It now writes the pid into a temporary file and then
renames that file to the correct pid file name. This way the pid file can not
exist without containing the correct value.
Fix segfault on specially crafted packet.
Make tail leak expiry time configurable
Some tail_repair_time adjustments

fix t/binary.t test.
Default of 3 hours is super overkill. 1 hour is still way too much but within
realm of reason.
Bail if someone sets it really low (10s or negative)
Issue 293: Remove unused condition variable
Issue 294: Check for allocation failure
Add statistics for allocation failures

This patch adds a new stat "malloc_fails" that is a counter of how
many times malloc/realloc/calloc returned NULL when we _needed_ it to
return something else (resulting in closing the connection or something
like that). Conditions where we could live without malloc returning
a new chunk of memory is not tracked with this counter.
Fix tests again..
fix for "variable length array folded to constant array as an extension" error
Added support for automake 1.13 & 1.14
Created DETECT_CLANG autoconf function, and excluded '-pthread' from CFLAGS when GCC is clang