redis-check-dump now understands dumps produced by Redis 2.6
redis-check-dump now understands dumps produced by Redis 2.6

(Commit message from @antirez as it was missign in the original commits,
also the patch was modified a bit to still work with 2.4 dumps and to
avoid if expressions that are always true due to checked types range)

This commit changes redis-check-dump to account for new encodings and
for the new MSTIME expire format. It also refactors the test for valid
type into a function.

The code is still compatible with Redis 2.4 generated dumps.

This fixes issue #709.

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