Fixed inverted if condition in MISCONF error code path.
Cluster: introduced repl_offset fields in clusterNode.

The two fields are used in order to remember the latest known
replication offset and the time we received it from other slave nodes.

This will be used by slaves in order to start the election procedure
with a delay that is proportional to the rank of the slave among the
other slaves for this master, when sorted for replication offset.

Usually this allows the slave with the most updated offset to win the
election and replace the failing master in the cluster.
Cluster: limit cluster.h to 80 cols.
Cluster: broadcast master/slave replication offset in bus header.
Cluster: clusterBroadcastPong() improved with target selection.

Now we can broadcast a pong to all the instances or just the local
slaves (that is useful for replication offset propagation).
Cluster: added a global myself pointer in cluster.c.

Accessing to the 'myself' node, the node representing the currently
running instance, is handy without the need to type
server.cluster->myself every time.
Cluster: use myself instead of server->cluster.myself.
Cluster: refactoring: new macros to check node flags.
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.