A tool for shuffling log entries

This tool can be used to read a log file and produce an equivalent log file with shuffled entries.
Indeed it still guarantees that the commits are ordered wrt transaction id.
Merge pull request #3148 from davidegrohmann/1.9-log-entry-shuffler

[1.9] A tool for shuffling log entries
Solves issue with election results from a rejoining elector being dropped

Previously, the elector version would not be reset when the elector left
 the cluster or it failed for some reason. The result was that
 the election results from that elector, which presumably would lose
 state and start counting election versions from 1, would be dropped
 by receivers since the version is now smaller than what they expected.
 This patch solves this by having all instances invalidate the known
 elector when it leaves the cluster or is marked as failed