Undo slave-master handshake when SLAVEOF sets a new slave.
Undo slave-master handshake when SLAVEOF sets a new slave.

Issue #828 shows how Redis was not correctly undoing a non-blocking
connection attempt with the previous master when the master was set to a
new address using the SLAVEOF command.

This was also a result of lack of refactoring, so now there is a
function to cancel the non blocking handshake with the master.
The new function is now used when SLAVEOF NO ONE is called or when
SLAVEOF is used to set the master to a different address.

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