Cluster: fix redis-trib help subcommand.
Cluster: redis-trib addnode is now able to add replicas.
Cluster: redis-trib shows what a slave replicates + fixes.

Also the :replicates info field in the node object is now correctly
populated. This also fixes the :replicas field computation.
Cluster: redis-trib help output format modified.
Cluster: redis-trib shows number of replicas of masters.
Set server.repl_down_since to 0 when changing master.

When an instance is potentially set to replicate with another master, it
is conceptually disconnected forever, since we have no old copy of the
dataset for this master in memory.
Cluster: allow CLUSTER REPLICATE to switch master.

The code was doing checks for slaves that should be done only when the
instance is currently a master. Switching a slave from a master to
another one should just work.
Cluster: fix error reporting when slaveof is found in config.
Cluster: don't rewrite slaveof config directive in cluster mode.
Cluster: debug printf statemets removed.

These were committed for error after being inserted in order to fix an
issue.
Cluster: master nodes wait before rejoining the cluster after reboot.

One of the simple heuristics used by Redis Cluster in order to avoid
losing data in the typical failure modes created by the asynchronous
replication with the slaves (a master is unable, when accepting a
write, to immediately tell if it should be really accepted or refused
because of a configuration change), is to wait some time before to
rejoin the cluster after being partitioned away from the majority of
instances.

A similar condition happens when a master is restarted. It does not know
if it was already failed over, nor if all the clients have already an
updated configuration about the cluster map, so it is possible that
clients will try to write to stale masters that were restarted.

In a similar way this commit changes masters behavior so they wait
2000 milliseconds before accepting writes after a reboot. There is
nothing special about 2 seconds if not to be a value supposedly larger
a few orders of magnitude compared to the cluster bus communication
latencies.
Use fflush() before fsync() in rio.c.

Incremental flushing in rio.c is only used to avoid huge kernel buffers
synched to slow disks creating big latency spikes, so this fix has no
durability implications, however it is certainly more correct to make
sure that the FILE buffers are flushed to the kernel before calling
fsync on the file descriptor.

Thanks to Li Shao Kai for reporting this issue in the Redis mailing
list.
redis-cli: support for --scan option.
redis-cli --help output improved with --scan and periods.
Cluster: clusterGenNodesDescription() refactored into two functions.
Cluster: CLUSTER SLAVES subcommand added.
Cluster: update slaves lists in clusterSetMaster().
Cluster: redis-trib set-timeout implemented.
Don't log MONITOR clients as disconnecting slaves.
Fixed inverted if condition in MISCONF error code path.