Sentinel: abort failover when in wait-start if master is back.
Sentinel: abort failover when in wait-start if master is back.

When we are a Leader Sentinel in wait-start state, starting with this
commit the failover is aborted if the master returns online.

This improves the way we handle a notable case of net split, that is the
split between Sentinels and Redis servers, that will be a very common
case of split becase Sentinels will often be installed in the client's
network and servers can be in a differnt arm of the network.

When Sentinels and Redis servers are isolated the master is in ODOWN
condition since the Sentinels can agree about this state, however the
failover does not start since there are no good slaves to promote (in
this specific case all the slaves are unreachable).

However when the split is resolved, Sentinels may sense the slave back
a moment before they sense the master is back, so the failover may start
without a good reason (since the master is actually working too).

Now this condition is reversible, so the failover will be aborted
immediately after if the master is detected to be working again, that
is, not in SDOWN nor in ODOWN condition.

brg-liuwei/redis,guker/redis,vincent-vivian-liu/redis,thomasdarimont/redis,zczhuohuo/redis,gilala/hredis,machicao2013/redis-source-annotated,wenxueliu/redis_comment,JoeWoo/redis,gilala/bjredis,0x55/redis-3.0-annotated,StevenTsai/redis,francischan714/redis,GrimDerp/redis,colstrom/redis,wprice/redis,aluzzardi/redis,Soledad89/redis,NBSW/redis,a-pavlov/redis,JoeWoo/redis,sunheehnus/redis,PradheepShrinivasan/redis,programmecat/redis,soveran/redis,vincent-vivian-liu/redis,simplestbest/redis,GitHubMota/redis,wangyikai/redis,Soledad89/redis,wuxiaowei907/annotated_redis_source,rrsean/redis-3.0-annotated,janekmi/redis,fankeke/redis-3.0-annotated,wprice/redis,AALEKH/redis,hgl888/redis,atreeyang/redis,xuguruogu/redis,Aliceljm1/redis-3.0-annotated,PKRoma/redis,kensou97/redis,aluzzardi/redis,jasonkying/redis,Aliceljm1/redis,sunlianqiang/redis-3.0-annotated,ramonsnir/redis,mumingv/redis-3.0-annotated,simplestbest/redis,wbailey5/redis,ton31337/redis,wbailey5/redis,jingjidejuren/redis,timothyohare/3rdPartySrc-redis,ChanningDuan/annotated_redis_source,izhoujie/redis,jingjidejuren/redis,ttuna/msot-redis,universsky/redis,ErikDubbelboer/redis,july2993/redis,kensou97/redis,xuzhezhaozhao/redis_reading,ipmobiletech/redis,AplayER/redis,0x20h/redis,iandyh/redis,nuxeh/redis,hgl888/redis,kmiku7/redis,iandyh/redis,pcarrier/redis,netroby/redis,yossigo/redis,himoca/redis,saisai/redis,aim-for-better/redis,StevenTsai/redis,gilala/bjredis,taoguan/redis,neomantra/redis,190235047/redis,modulexcite/redis,duanx/redis,MSOpenTech/redis,mrb/redis,RepmujNetsik/redis,gspandy/annotated_redis_source,dongqifan2/redis-3.0-annotated,shshlzh/redis-3.0-annotated,zhiliaoniu/redis,itamarhaber/redis,elkingtonmcb/redis,honestme/redis,yybirdcf/learn-redis,vincent-vivian-liu/redis,Sciumo/redis,nnog/redis,xujunhai1991/redis,roth1002/redis,elkingtonmcb/redis,universsky/redis,francischan714/redis,himoca/redis,Sciumo/redis,hawkchch/redis,wangyikai/redis,JoeWoo/redis,allengaller/redis,mattsta/redis,ipmobiletech/redis,weizijun/redis,adamweixuan/redis-3.0-annotated,cusspvz/redis,ytjiang/redis,cloudrain21/redis,july2993/redis,darksideofthemoo/redis-histogram,citusdata/redis,buobao/redis-3.0-annotated,shining-yang/redis,allengaller/redis,dayuoba/redis,ksarch-saas/redis,SyntaxStacks/redis,qiyang0221/redis,MOON-CLJ/redis,ouyangkongtong/redis,rogerlz/redis,ytjiang/redis,hawkchch/redis,miaoyc1989/redis-3.0-annotated,weizijun/redis,AplayER/redis,netroby/redis,viongpanzi/annotated_redis_source,Markgorden/redis,pietern/redis,hhli/redis,arijitvt/redis,pedigree/redis,programmecat/redis,zy416548283/redis-3.0-annotated,gilala/redis,splitice/redis,taoguan/redis,mverrilli/redis,allengaller/redis,GitHubMota/redis,nilyang/redis-tdd-annotation,ituncle/redis,jbochi/redis,july2993/redis,jbochi/parallel_redis,zhcy/redis,pietern/redis,neomantra/redis,ton31337/redis,cusspvz/redis,rrsean/redis-3.0-annotated,gongice/redis-3.0-annotated,ketor/redis,kmiku7/redis,qiyang0221/redis,a-pavlov/redis,wenxueliu/redis_comment,shreesundara/redis,dongqifan2/redis-3.0-annotated,machicao2013/redis-source-annotated,pietern/redis,seandsky/redis,xuzhezhaozhao/redis_reading,seppo0010/rlite-server,zhaobo1023/redis-3.0-annotated,Soledad89/redis,huangz1990/experiment-redis,danny200309/annotated_redis_source,healerkx/redis,WorkingOfTimtohyZhang/redis-3.0-annotated,miaoyc1989/redis-3.0-annotated,blackmady/redis,soloestoy/redis,jackyan/redis,0x20h/redis,mengzhejin/RedisStudy,machicao2013/redis-source-annotated,huangz1990/redis-3.0-annotated,gechong/redis-3.0-annotated,narma/redis,ipmobiletech/redis,healerkx/redis,nnog/redis,Markgorden/redis,hgl888/redis,mingyaaaa/redis,ksarch-saas/redis,ttuna/msot-redis,mumingv/redis-3.0-annotated,tellapart/redis,j0hnma/hszredis,shreesundara/redis,dreamquster/redis,mpalmer/redis,mrb/redis,guker/redis,rouzier/redis,slfs007/mk-redis,mingyaaaa/redis,louisliangjun/redis,YuraLukashik/redis,j0hnma/hszredis,yuzhangjob/redis-3.0-annotated-unstable,spinlock/redis,h0x91b/redis,wprice/redis,MasahikoSawada/redis,CodeJuan/redis,aim-for-better/redis,wbailey5/redis,HeartSaVioR/redis,itugs/redis,xlzhan/redis,gechong/redis-3.0-annotated,ton31337/redis,seppo0010/redis,citusdata/redis,itugs/redis,xujunhai1991/redis,jasonkying/redis,mumingv/redis,whille/redis-3.0-annotated,mingyaaaa/redis,seandsky/redis,programmecat/redis,roth1002/redis,clamoriniere1A/redis,gilala/hredis,xlzhan/redis,seandsky/redis,YongMan/redis,0x55/redis-3.0-annotated,jingjidejuren/redis,gongice/redis-3.0-annotated,huangz1990/redis-3.0-annotated,machicao2013/redis-source-annotated,linfangrong/redis,ReadCode/redis-3.0-annotated,StevenTsai/redis,zhcy/redis,Hailei/redis,sunheehnus/redis,Markgorden/redis,csuhawk/redis,riyan8250/redis,modulexcite/redis,fengshao0907/annotated_redis_source,fengshao0907/redis-3.0-annotated,onlymellb/redis-3.0-annotated,Cisphyx/redis-websockets,alenslan/redis,huangz1990/annotated_redis_source,gaoxianglong/redis,ncopa/redis,splitice/redis,moonbingbing/redis-3.0-annotated,danny200309/annotated_redis_source,ChaosCoo/annotated_redis_source,valdsJohn/redis,unasm/redis-3.0-annotated,taoguan/redis,idning/redis,0x20h/redis,wbailey5/redis,mpalmer/redis,sunheehnus/redis,kaushik94/redis,rogerchina/redis,taoguan/redis,xuzhezhaozhao/redis_reading,zguangyu/redis,cnbin/redis,jxwr/redis,tidatida/annotated_redis_source,louisliangjun/redis,ChanningDuan/annotated_redis_source,nilyang/redis-tdd-annotation,netroby/redis,gaoxianglong/redis,tellapart/redis,gilala/redis,hedisdb/hedis,francischan714/redis,jacklee0810/redis-3.0-annotated,zhaobo1023/redis-3.0-annotated,YuraLukashik/redis,ChaosCoo/annotated_redis_source,harrisonfeng/redis,yybirdcf/learn-redis,ituncle/redis,haima-zju/redis-3.0-annotated,0x20h/redis,mverrilli/redis,alenslan/redis,hedisdb/hedis,clamoriniere1A/redis,ttuna/msot-redis,Hailei/redis,zhoudayang/redis,alenslan/redis,xujunhai1991/redis,fengshao0907/redis,tzq668766/redis-3.0-annotated,citusdata/redis,dayuoba/redis,ttuna/msot-redis,badboy/redis,narma/redis,GrimDerp/redis,ituncle/redis,Wangyao14cyy/redis,MasahikoSawada/redis,shining-yang/redis,Markgorden/redis,mumingv/redis,slfs007/mk-redis,yybirdcf/learn-redis,Aliceljm1/redis,arijitvt/redis,fengshao0907/redis,YuanZhewei/redis,blackmady/redis,harrisonfeng/redis,izhoujie/redis,h0x91b/redis,SummonY/redis,oranagra/redis,Soledad89/redis,yuhc/redis-benchmark-enhanced,antirez/redis,clamoriniere1A/redis,adamweixuan/redis-3.0-annotated,francischan714/redis,dayuoba/redis,universsky/redis,j0hnma/szredis,healerkx/redis,zhoudayang/redis,pcarrier/redis,soloestoy/redis,danny200309/annotated_redis_source,wangyikai/redis,clamoriniere1A/redis,hhli/redis,MSOpenTech/redis,cloudrain21/redis,ncopa/redis,RepmujNetsik/redis,universsky/redis,dramenk/annotated_redis_source,csuhawk/redis,ramonsnir/redis,ErikDubbelboer/redis,allengaller/redis,PradheepShrinivasan/redis,hawkchch/redis,190235047/redis,izhoujie/redis,yossigo/redis,yuhc/redis-benchmark-enhanced,mengyou0304/redis,sunlianqiang/redis-3.0-annotated,riyan8250/redis,ofirluzon/redis,mcanthony/redis,Aaron1992/redis,tanghaodong25/redis,magastzheng/redis-3.0-annotated,HeartSaVioR/redis,fankeke/redis-3.0-annotated,takeshineshiro/redis,shreesundara/redis,flashbuckets/redis,josiahcarlson/redis,HouKangkang/redis-3.0-annotated,yossigo/redis,colstrom/redis,wujf/redis,HunanTV/redis,YongMan/redis,hhli/redis,dreamquster/redis,buobao/redis-3.0-annotated,gspandy/annotated_redis_source,gilala/hbjredis,HunanTV/redis,wujf/redis,pcarrier/redis,holstvoogd/redis,zguangyu/redis,gaoxianglong/redis,drinkthere/redis-3.0-annotated,davidradunz/redis,antirez/redis,seppo0010/redis,atreeyang/redis,mpalmer/redis,Wangyao14cyy/redis,HeartSaVioR/redis,supasate/redis,wangyikai/redis,magastzheng/redis-3.0-annotated,hornen/redis,tanghaodong25/redis,YuanZhewei/redis,simplestbest/redis,charsyam/redis,jermnelson/redis,ipmobiletech/redis,mcanthony/redis,twskipper/redis,jingjidejuren/redis,hgl888/redis,MSOpenTech/redis,pmem/redis,NBSW/redis,PKRoma/redis,adamweixuan/redis-3.0-annotated,itugs/redis,supasate/redis,figoxu/annotated_redis_source,hornen/redis,hornen/redis,zhiliaoniu/redis,Aaron1992/redis,seppo0010/rlite-server,PradheepShrinivasan/redis,GitHubMota/redis,pmem/redis,weizijun/redis,duanx/redis,SummonY/redis,fengshao0907/redis-3.0-annotated,msn217/redis-3.0-annotated,xuguruogu/redis,pietern/redis,nilyang/redis-tdd-annotation,tanghaodong25/redis,jasonkying/redis,valdsJohn/redis,iandyh/redis,mengzhejin/RedisStudy,ksarch-saas/redis,antirez/redis,xuguruogu/redis,jxwr/redis,janekmi/redis,ituncle/redis,jacklee0810/redis-3.0-annotated,huyuezheng/redis,hhli/redis,tjschuck/redis,holstvoogd/redis,RepmujNetsik/redis,nnog/redis,kensou97/redis,csuhawk/redis,kaushik94/redis,wuxiaowei907/annotated_redis_source,ChaosCoo/annotated_redis_source,ketor/redis,jacklee0810/redis-3.0-annotated,hedisdb/hedis,huyuezheng/redis,soveran/redis,mumingv/redis,zhoudayang/redis,StevenTsai/redis,WorkingOfTimtohyZhang/redis-3.0-annotated,Hailei/redis,ton31337/redis,huangz1990/annotated_redis_source,gilala/hbjredis,abhiklodh/redis,himoca/redis,xujunhai1991/redis,rogerchina/redis,oranagra/redis,tjschuck/redis,GrimDerp/redis,devaos/redis,mgk/redis,janekmi/redis,whille/redis-3.0-annotated,jermnelson/redis,healerkx/redis,rrsean/redis-3.0-annotated,4396/redis,rouzier/redis,dayuoba/redis,j0hnma/szredis,itamarhaber/redis,moonbingbing/redis-3.0-annotated,aim-for-better/redis,mattsta/redis,shining-yang/redis,mrb/redis,xuzhezhaozhao/redis_reading,ncopa/redis,jacklee0810/annotated_redis_source,haima-zju/redis-3.0-annotated,jackyan/redis,davidradunz/redis,SyntaxStacks/redis,yuzhangjob/redis-3.0-annotated-unstable,oranagra/redis,zczhuohuo/redis,figoxu/annotated_redis_source,viongpanzi/annotated_redis_source,pmem/redis,Aliceljm1/redis-3.0-annotated,pedigree/redis,gilala/bjredis,NBSW/redis,AplayER/redis,YuanZhewei/redis,LongXQ/redis,gilala/hbjredis,HeartSaVioR/redis,tzq668766/redis-3.0-annotated,shshlzh/redis-3.0-annotated,MasahikoSawada/redis,whille/redis-3.0-annotated,zguangyu/redis,SyntaxStacks/redis,YuraLukashik/redis,mgk/redis,msn217/redis-3.0-annotated,MOON-CLJ/redis,j0hnma/szredis,HunanTV/redis,mengyou0304/redis,wuyu201321060203/redis-3.0-annotated,soveran/redis,honestme/redis,GitHubMota/redis,weizijun/redis,saisai/redis,neomantra/redis,cusspvz/redis,Wangyao14cyy/redis,mgk/redis,gilala/redis,ytjiang/redis,WorkingOfTimtohyZhang/redis-3.0-annotated,netroby/redis,OmarQunsul/graph-redis,pedigree/redis,YuraLukashik/redis,drinkthere/redis-3.0-annotated,msn217/redis-3.0-annotated,mengyou0304/redis,kensou97/redis,SummonY/redis,mumingv/redis-3.0-annotated,LongXQ/redis,nuxeh/redis,AALEKH/redis,holstvoogd/redis,wuyu201321060203/redis-3.0-annotated,ErikDubbelboer/redis,qiyang0221/redis,zhoudayang/redis,jxwr/redis,thomasdarimont/redis,mgk/redis,seppo0010/redis,PKRoma/redis,tjschuck/redis,gongice/redis-3.0-annotated,zczhuohuo/redis,nuxeh/redis,elkingtonmcb/redis,linfangrong/redis,itamarhaber/redis,tjschuck/redis,flashbuckets/redis,mengzhejin/RedisStudy,tzq668766/redis-3.0-annotated,slfs007/mk-redis,gilala/hredis,gechong/redis-3.0-annotated,zguangyu/redis,nuxeh/redis,takeshineshiro/redis,narma/redis,pkdevbox/redis,4396/redis,spinlock/redis,spearhead-ea/redis,pkdevbox/redis,h0x91b/redis,zhiliaoniu/redis,hornen/redis,atreeyang/redis,devaos/redis,mpalmer/redis,abhiklodh/redis,seppo0010/rlite-server,zhaobo1023/redis-3.0-annotated,jbochi/parallel_redis,magastzheng/redis-3.0-annotated,duanx/redis,cnbin/redis,miaoyc1989/redis-3.0-annotated,SyntaxStacks/redis,4396/redis,jermnelson/redis,mverrilli/redis,xlzhan/redis,CodeJuan/redis,twskipper/redis,timothyohare/3rdPartySrc-redis,Sciumo/redis,rogerlz/redis,devaos/redis,onlymellb/redis-3.0-annotated,zy416548283/redis-3.0-annotated,wuxiaowei907/annotated_redis_source,Aliceljm1/redis,fengshao0907/annotated_redis_source,z-fork/redis,spearhead-ea/redis,izhoujie/redis,gilala/hredis,OmarQunsul/graph-redis,gilala/hbjredis,jbochi/redis,GrimDerp/redis,ctripcorp/redis,pedigree/redis,tellapart/redis,miaoyc1989/redis-3.0-annotated,splitice/redis,unasm/redis-3.0-annotated,csuhawk/redis,july2993/redis,charsyam/redis,cloudrain21/redis,dreamquster/redis,h0x91b/redis,Sciumo/redis,louisliangjun/redis,spinlock/redis,buobao/redis-3.0-annotated,jackyan/redis,cloudrain21/redis,holstvoogd/redis,mingyaaaa/redis,charsyam/redis,MasahikoSawada/redis,fengshao0907/redis,antirez/redis,huangz1990/experiment-redis,0x55/redis-3.0-annotated,oranagra/redis,yossigo/redis,soveran/redis,roth1002/redis,yossigo/redis,huangz1990/experiment-redis,wujf/redis,thomasdarimont/redis,YongMan/redis,gilala/bjredis,charsyam/redis,idning/redis,tidatida/annotated_redis_source,z-fork/redis,mverrilli/redis,guker/redis,ksarch-saas/redis,ofirluzon/redis,saisai/redis,gspandy/annotated_redis_source,wuyu201321060203/redis-3.0-annotated,ttuna/msot-redis,blackmady/redis,jackyan/redis,wenxueliu/redis_comment,fengshao0907/redis,zy416548283/redis-3.0-annotated,darksideofthemoo/redis-histogram,a-pavlov/redis,aim-for-better/redis,AALEKH/redis,RepmujNetsik/redis,guker/redis,z-fork/redis,iandyh/redis,saisai/redis,takeshineshiro/redis,darksideofthemoo/redis-histogram,Aaron1992/redis,Wangyao14cyy/redis,CodeJuan/redis,j0hnma/hszredis,abhiklodh/redis,dramenk/annotated_redis_source,j0hnma/szredis,maodeyi/redis_lua,kmiku7/redis,190235047/redis,viongpanzi/annotated_redis_source,brg-liuwei/redis,drinkthere/redis-3.0-annotated,kaushik94/redis,idning/redis,OmarQunsul/graph-redis,mumingv/redis,honestme/redis,NBSW/redis,wenxueliu/redis_comment,jacklee0810/annotated_redis_source,harrisonfeng/redis,soloestoy/redis,cnbin/redis,pmem/redis,timothyohare/3rdPartySrc-redis,jasonkying/redis,twskipper/redis,PKRoma/redis,modulexcite/redis,simplestbest/redis,hedisdb/hedis,j0hnma/hszredis,shshlzh/redis-3.0-annotated,mrb/redis,4396/redis,hawkchch/redis,ouyangkongtong/redis,MSOpenTech/redis,rogerchina/redis,ouyangkongtong/redis,yuhc/redis-benchmark-enhanced,ChanningDuan/annotated_redis_source,zhiliaoniu/redis,ofirluzon/redis,190235047/redis,pkdevbox/redis,jbochi/parallel_redis,HunanTV/redis,kaushik94/redis,YuanZhewei/redis,haima-zju/redis-3.0-annotated,davidradunz/redis,nilyang/redis-tdd-annotation,xuguruogu/redis,elkingtonmcb/redis,soloestoy/redis,riyan8250/redis,takeshineshiro/redis,rogerlz/redis,cnbin/redis,fengshao0907/annotated_redis_source,zhcy/redis,OmarQunsul/graph-redis,ctripcorp/redis,ketor/redis,0x55/redis-3.0-annotated,splitice/redis,yuzhangjob/redis-3.0-annotated-unstable,fankeke/redis-3.0-annotated,supasate/redis,huyuezheng/redis,Aliceljm1/redis-3.0-annotated,rouzier/redis,janekmi/redis,JoeWoo/redis,Cisphyx/redis-websockets,wujf/redis,xlzhan/redis,ErikDubbelboer/redis,pkdevbox/redis,CodeJuan/redis,pcarrier/redis,shining-yang/redis,flashbuckets/redis,Hailei/redis,ctripcorp/redis,jbochi/redis,sunheehnus/redis,maodeyi/redis_lua,MSOpenTech/redis,brg-liuwei/redis,neomantra/redis,ramonsnir/redis,charsyam/redis,atreeyang/redis,alenslan/redis,a-pavlov/redis,brg-liuwei/redis,seppo0010/redis,ytjiang/redis,blackmady/redis,itamarhaber/redis,tidatida/annotated_redis_source,Aliceljm1/redis,rogerlz/redis,honestme/redis,ouyangkongtong/redis,huyuezheng/redis,aluzzardi/redis,timothyohare/3rdPartySrc-redis,arijitvt/redis,PradheepShrinivasan/redis,badboy/redis,valdsJohn/redis,onlymellb/redis-3.0-annotated,linfangrong/redis,Cisphyx/redis-websockets,gilala/redis,riyan8250/redis,mcanthony/redis,mcanthony/redis,Aaron1992/redis,flashbuckets/redis,PKRoma/redis,z-fork/redis,HouKangkang/redis-3.0-annotated,darksideofthemoo/redis-histogram,qiyang0221/redis,ofirluzon/redis,abhiklodh/redis,aluzzardi/redis,AALEKH/redis,MOON-CLJ/redis,sunlianqiang/redis-3.0-annotated,wprice/redis,tellapart/redis,colstrom/redis,idning/redis,ctripcorp/redis,spinlock/redis,tanghaodong25/redis,rouzier/redis,zczhuohuo/redis,zhcy/redis,mengyou0304/redis,mengzhejin/RedisStudy,modulexcite/redis,badboy/redis,linfangrong/redis,huangz1990/redis-3.0-annotated,ofirluzon/redis,itugs/redis,HouKangkang/redis-3.0-annotated,dramenk/annotated_redis_source,figoxu/annotated_redis_source,colstrom/redis,roth1002/redis,twskipper/redis,vincent-vivian-liu/redis,mattsta/redis,neomantra/redis,yybirdcf/learn-redis,shshlzh/redis-3.0-annotated,supasate/redis,cusspvz/redis,YongMan/redis,harrisonfeng/redis,shreesundara/redis,huangz1990/annotated_redis_source,LongXQ/redis,rogerchina/redis,ReadCode/redis-3.0-annotated,jacklee0810/annotated_redis_source,josiahcarlson/redis,seandsky/redis,devaos/redis,ReadCode/redis-3.0-annotated,dongqifan2/redis-3.0-annotated,nnog/redis,louisliangjun/redis,programmecat/redis,arijitvt/redis,unasm/redis-3.0-annotated,ncopa/redis,kmiku7/redis,AplayER/redis,soloestoy/redis,yuhc/redis-benchmark-enhanced,LongXQ/redis,fengshao0907/redis-3.0-annotated,oranagra/redis,maodeyi/redis_lua,josiahcarlson/redis,wuyu201321060203/redis-3.0-annotated,citusdata/redis,gaoxianglong/redis,josiahcarlson/redis,huangz1990/experiment-redis,seppo0010/rlite-server,valdsJohn/redis,duanx/redis,badboy/redis,thomasdarimont/redis,dreamquster/redis,moonbingbing/redis-3.0-annotated,SummonY/redis,davidradunz/redis,Cisphyx/redis-websockets,spearhead-ea/redis