Variable renaming for clarity (and probably bug fix in v2)

It is supposed to fix a bug observed in v2 where the state hash were
only about a monolog, hidding some state set from each side to the other
side...
Basic support of streaming replication message

Original code by Guillaume Lelarge, refactored partialy on new code
architecture by me with some more code (autodetect) and missing parts
because of uncompatibility between SR procotol 9.0, 9.1 and 9.2...

This patch force %state for protocol v3 everywhere