replicationFeedSlave() reworked for correctness and speed.
replicationFeedSlave() reworked for correctness and speed.

The previous code using a static buffer as an optimization was lame:

1) Premature optimization, actually it was *slower* than naive code
   because resulted into the creation / destruction of the object
   encapsulating the output buffer.
2) The code was very hard to test, since it was needed to have specific
   tests for command lines exceeding the size of the static buffer.
3) As a result of "2" the code was bugged as the current tests were not
   able to stress specific corner cases.

It was replaced with easy to understand code that is safer and faster.

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