Cluster: update node replication offset from bus packets headers.
Cluster: function clusterGetSlaveRank() added.

Return the number of slaves for the same master having a better
replication offset of the current slave, that is, the slave "rank" used
to pick a delay before the request for election.
Cluster: added progressive election delay according to slave rank.

Note that when we compute the initial delay, there are probably still
more up to date information to receive from slaves with new offsets, so
the delay is recomputed when new data is available.
Cluster: log offset when announcing the failover election delay.
Cluster: broadcast pong to other slaves in the same ring.

When we schedule a failover, broadcast a PONG to the slaves.
The other slaves that plan to get elected will do the same too, this way
it is likely that every slave will have a good picture of its own rank.

Note that this is N*N messages where N is the number of slaves for the
failing master, however usually even large clusters have many master
nodes but a limited number of replicas per node, so this is harmless.
Cluster: remove not needed return statement breaking failover.
Cluster: swap two code blocks to have a more obvious flow.
Cluster: replica migration implementation.

This feature allows slaves to migrate to orphaned masters (masters
without working slaves), as long as a set of conditions are met,
including the fact that the migrating slave needs to be in a
master-slaves ring with at least another slave working.
Cluster: perform orphaned masters check before continue statements.

The check was placed in a way that conflicted with the continue
statements used by the node hearth beat code later that needs to skip
the current node sometimes. Moved at the start of the function so that's
always executed.
Sentinel: check arity for SENTINEL MASTER command.

This fixes issue #1530.
Cluster: configurable replicas migration barrier.

It is possible to configure the min number of additional working slaves
a master should be left with, for a slave to migrate to an orphaned
master.
Cluster: barrer -> barrier in redis.conf.
Cluster: fix an error in migration-barrier comment in redis.conf.
Add support for listen(2) backlog definition

In high RPS environments, the default listen backlog is not sufficient, so
giving users the power to configure it is the right approach, especially
since it requires only minor modifications to the code.
Option "backlog" renamed "tcp-backlog".

This is especially important since we already have a concept of backlog
(the replication backlog).
Redis.conf comment about tcp-backlog option improved.
Test: fixed osx msg passing issue in testing framework.

The Redis test uses a server-clients model in order to parallelize the
execution of different tests. However in recent versions of osx not
setting the channel to a binary encoding caused issues even if AFAIK no
binary data is really sent via this channel. However now the channels
are deliberately set to a binary encoding and this solves the issue.

The exact issue was the test not terminating and giving the impression
of running forever, since test clients or servers were unable to
exchange the messages to continue.
update copyright year
Merge pull request #1534 from gdi2290/patch-1

update copyright year