Add jgroups code to handle mergeview event

And many tiny fixes or improvements

Signed-off-by: plysan <plysab@gmail.com>