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.
Don't stop reading redis.conf if line has no args.

Should be "continue" and was "return".

This fixes issue #1110
Try to report source of bad Lua API calls
Top comment for prepareClientToWrite() clarified.

We don't write the output buffer to the client socket for slaves only if
the slave is not online.
Replication: don't even queue replies to master commands.

When master send commands, there is no need for the slave to reply.
Redis used to queue the reply in the output buffer and discard the reply
later, this is a waste of work and it is not clear why it was this way
(I sincerely don't remember).

This commit changes it in order to don't queue the reply at all.

All tests passing.
Fixed a bug in no queueing replies to master.
REPLCONF ACK command.

This special command is used by the slave to inform the master the
amount of replication stream it currently consumed.

it does not return anything so that we not need to consume additional
bandwidth needed by the master to reply something.

The master can do a number of things knowing the amount of stream
processed, such as understanding the "lag" in bytes of the slave, verify
if a given command was already processed by the slave, and so forth.
Replication: send REPLCONF ACK to master.
Make sure that REPLCONF ACK really has no return value.
Don't ACK the master after every command.

Sending an ACK is now moved into the replicationSendAck() function.
Send ACK to master once every second.

ACKs can be also used as a base for synchronous replication. However in
that case they'll be explicitly requested by the master when the client
sends a request that needs to be replicated synchronously.
Close connection with timedout slaves.

Now masters, using the time at which the last REPLCONF ACK was received,
are able to explicitly disconnect slaves that are no longer responding.

Previously the only chance was to see a very long output buffer, that
was highly suboptimal.
redis.conf updated: repl-timeout now uesd by masters as well.
Version bumped to 2.9.11
A comment about BLPOP timeout did not reflected actual behavior.
Accept REPLCONF in any state.