fix randstring bug
don't define _XOPEN_SOURCE for NetBSD

on NetBSD, defining _XOPEN_SOURCE hides extensions
like inet_aton, strcasecmp, etc.
rename popcount to popcount_binary to avoid a conflict with NetBSD libc

NetBSD-current's libc has a function named popcount.
hiding these extensions using feature macros is not possible because
redis uses other extensions covered by the same feature macro.
eg. inet_aton
use nanosleep instead of usleep

SUSv3 says that:
	The useconds argument shall be less than one million. If the value of
	useconds is 0, then the call has no effect.
and actually NetBSD's implementation rejects such a value with EINVAL.
use nanosleep which has no such a limitation instead.
don't assume time_t == long

time_t is always 64bit on recent versions of NetBSD.
Try to report source of bad Lua API calls
min-slaves-to-write: initial description of the feature in redis.conf
min-slaves-to-write: don't accept writes with less than N replicas.

This feature allows the user to specify the minimum number of
connected replicas having a lag less or equal than the specified
amount of seconds for writes to be accepted.
min-replicas-to-write: only deny write commands.

I guess I needed another coffee...
Make tests compatible with new INFO replication output.
Refresh good slaves count when setting slave state as online.
New INFO field "min_slaves_good_slaves".

When min-slaves-to-write feature is active, this field reports the
number of slaves considered good (online state, lag within the specified
range).
Refresh good slaves count after CONFIG SET min-slaves-...

This way just after the CONFIG SET enabling the min-slaves feature it is
possible to write to the database without delays.
Tests added for min-slaves feature.
Test: avoid a false positive in min-slaves test.
CONFIG SET: accept slave-priority zero, it is valid.
Binary safe dump of object content in redisLogObjectDebugInfo().
clusterProcessPacket() comments improved for correctness.
Cluster: detect nodes address change.
test-server: only listen to 127.0.0.1

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>