Fix quicklistReplaceAtIndex() by updating the quicklist ziplist size.
Fix quicklistReplaceAtIndex() by updating the quicklist ziplist size.

The quicklist takes a cached version of the ziplist representation size
in bytes. The implementation must update this length every time the
underlying ziplist changes. However quicklistReplaceAtIndex() failed to
fix the length.

During LSET calls, the size of the ziplist blob and the cached size
inside the quicklist diverged. Later, when this size is used in an
authoritative way, for example during nodes splitting in order to copy
the nodes, we end with a duplicated node that may contain random
garbage.

This commit should fix issue #3343, however several problems were found
reviewing the quicklist.c code in search of this bug that should be
addressed soon or later.

For example:

1. To take a cached ziplist length is fragile since failing to update it
leads to this kind of issues.

2. The node splitting code needs auditing. For example it works just for
a side effect of ziplistDeleteRange() to be able to cope with a wrong
count of elements to remove. The code inside quicklist.c assumes that
-1 means "delete till the end" while actually it's just a count of how
many elements to delete, and is an unsigned count. So -1 gets converted
into the maximum integer, and just by chance the ziplist code stops
deleting elements after there are no more to delete.

3. Node splitting is extremely inefficient, it copies the node and
removes elements from both nodes even when actually there is to move a
single entry from one node to the other, or when the new resulting node
is empty at all so there is nothing to copy but just to create a new
node.

However at least for Redis 3.2 to introduce fresh code inside
quicklist.c may be even more risky, so instead I'm writing a better
fuzzy tester to stress the internals a bit more in order to anticipate
other possible bugs.

This bug was found using a fuzzy tester written after having some clue
about where the bug could be. The tester eventually created a ~2000
commands sequence able to always crash Redis. I wrote a better version
of the tester that searched for the smallest sequence that could crash
Redis automatically. Later this smaller sequence was minimized by
removing random commands till it still crashed the server. This resulted
into a sequence of 7 commands. With this small sequence it was just a
matter of filling the code with enough printf() to understand enough
state to fix the bug.

spinlock/redis,hgl888/redis,rogerchina/redis,antirez/redis,yossigo/redis,zguangyu/redis,neomantra/redis,neomantra/redis,neomantra/redis,h0x91b/redis,ofirluzon/redis,colstrom/redis,hgl888/redis,sunheehnus/redis,nnog/redis,sunheehnus/redis,soloestoy/redis,ctripcorp/redis,ofirluzon/redis,OmarQunsul/graph-redis,spinlock/redis,PKRoma/redis,ofirluzon/redis,yossigo/redis,arijitvt/redis,Sciumo/redis,Markgorden/redis,h0x91b/redis,colstrom/redis,yossigo/redis,kensou97/redis,rogerchina/redis,ctripcorp/redis,GitHubMota/redis,charsyam/redis,dreamquster/redis,hgl888/redis,PKRoma/redis,pmem/redis,Sciumo/redis,YongMan/redis,Markgorden/redis,ofirluzon/redis,spinlock/redis,neomantra/redis,arijitvt/redis,Markgorden/redis,nnog/redis,arijitvt/redis,ton31337/redis,soloestoy/redis,soveran/redis,OmarQunsul/graph-redis,badboy/redis,h0x91b/redis,pmem/redis,oranagra/redis,pmem/redis,neomantra/redis,sunheehnus/redis,badboy/redis,badboy/redis,Sciumo/redis,soveran/redis,charsyam/redis,oranagra/redis,YongMan/redis,soloestoy/redis,charsyam/redis,kensou97/redis,dreamquster/redis,soloestoy/redis,spinlock/redis,soveran/redis,nnog/redis,colstrom/redis,zguangyu/redis,nnog/redis,soveran/redis,OmarQunsul/graph-redis,oranagra/redis,OmarQunsul/graph-redis,dreamquster/redis,Markgorden/redis,GitHubMota/redis,Sciumo/redis,rogerchina/redis,ton31337/redis,rogerchina/redis,charsyam/redis,antirez/redis,kensou97/redis,antirez/redis,ofirluzon/redis,badboy/redis,pmem/redis,ton31337/redis,PKRoma/redis,h0x91b/redis,oranagra/redis,arijitvt/redis,zguangyu/redis,ctripcorp/redis,GitHubMota/redis,sunheehnus/redis,YongMan/redis,yossigo/redis,charsyam/redis,PKRoma/redis,ctripcorp/redis,zguangyu/redis,YongMan/redis,kensou97/redis,soloestoy/redis,oranagra/redis,yossigo/redis,colstrom/redis,PKRoma/redis,dreamquster/redis,GitHubMota/redis,antirez/redis,ton31337/redis,hgl888/redis