Transactions: propagate MULTI/EXEC only when needed.
Transactions: propagate MULTI/EXEC only when needed.

MULTI/EXEC is now propagated to the AOF / Slaves only once we encounter
the first command that is not a read-only one inside the transaction.

The old behavior was to always propagate an empty MULTI/EXEC block when
the transaction was composed just of read only commands, or even
completely empty. This created two problems:

1) It's a bandwidth waste in the replication link and a space waste
   inside the AOF file.

2) We used to always increment server.dirty to force the propagation of
   the EXEC command, resulting into triggering RDB saves more often
   than needed.

Note: even read-only commands may also trigger writes that will be
propagated, when we access a key that is found expired and Redis will
synthesize a DEL operation. However there is no need for this to stay
inside the transaction itself, but only to be ordered.

So for instance something like:

    MULTI
    GET foo
    SET key zap
    EXEC

May be propagated into:

    DEL foo
    MULTI
    SET key zap
    EXEC

While the DEL is outside the transaction, the commands are delivered in
the right order and it is not possible for other commands to be inserted
between DEL and MULTI.

adamweixuan/redis,quangnguyen90/redis,hanmichael/redis,kts12345/redis,nandhanurrevanth/redis,LittlePeng/redis,kts12345/redis,miminus/redis,ideaar/redis,laurencee/redis,crask/redis-cutter,miminus/redis,Jonavin/redis,ScottKaiGu/redis,oaastest/redis,ScottKaiGu/redis,richmonkey/netleveldb,kolonse/redis,enginekit/redis,oaastest/redis,liqiang199105/redis,powerumc/MyRedis,jqk6/redis,StartTheShift/redis-shift,powerumc/MyRedis,laurencee/redis,Cybermaxs/redis,richmonkey/netleveldb,hanmichael/redis,jaambee/redis,sidsen/redis,ideaar/redis,kts12345/redis,powerumc/MyRedis_old,shanegxxiao/redis,LittlePeng/redis,kolonse/redis,nandhanurrevanth/redis,ScottKaiGu/redis,kolonse/redis,enginekit/redis,kolonse/redis,jacklee0810/redis,powerumc/MyRedis_old,janeasystems/redis,Cybermaxs/redis,oaastest/redis,janeasystems/redis,jacklee0810/redis,alpha8/redis,adamweixuan/redis,ideaar/redis,Jonavin/redis,sidsen/redis,nandhanurrevanth/redis,erwin00776/redis-2.8-optimize,liqiang199105/redis,richmonkey/netleveldb,miminus/redis,hanmichael/redis,Jonavin/redis,jaambee/redis,enginekit/redis,janeasystems/redis,miminus/redis,nandhanurrevanth/redis,StartTheShift/redis-shift,upsoft/redis,quangnguyen90/redis,alpha8/redis,liqiang199105/redis,Jonavin/redis,upsoft/redis,oaastest/redis,laurencee/redis,jaambee/redis,Jonavin/redis,crask/redis-cutter,hanmichael/redis,kts12345/redis,enginekit/redis,enginekit/redis,ScottKaiGu/redis,powerumc/MyRedis_old,powerumc/MyRedis,jqk6/redis,Cybermaxs/redis,quangnguyen90/redis,Cybermaxs/redis,kts12345/redis,upsoft/redis,liqiang199105/redis,sidsen/redis,StartTheShift/redis-shift,jqk6/redis,miminus/redis,fanxu/redis,damy/redis,shanegxxiao/redis,shanegxxiao/redis,fanxu/redis,quangnguyen90/redis,erwin00776/redis-2.8-optimize,jqk6/redis,janeasystems/redis,laurencee/redis,nandhanurrevanth/redis,LittlePeng/redis,kolonse/redis,crask/redis-cutter,Cybermaxs/redis,janeasystems/redis,jaambee/redis,ScottKaiGu/redis,jacklee0810/redis,oaastest/redis,erwin00776/redis-2.8-optimize,hanmichael/redis,damy/redis,jaambee/redis,alpha8/redis,sidsen/redis,shanegxxiao/redis,jqk6/redis,alpha8/redis,ideaar/redis,shanegxxiao/redis,fanxu/redis,damy/redis,richmonkey/netleveldb,liqiang199105/redis,laurencee/redis,quangnguyen90/redis,sidsen/redis,sidsen/redis,jacklee0810/redis,damy/redis,alpha8/redis,upsoft/redis,fanxu/redis,ideaar/redis,damy/redis,erwin00776/redis-2.8-optimize,adamweixuan/redis,upsoft/redis,powerumc/MyRedis_old,adamweixuan/redis,adamweixuan/redis,jacklee0810/redis