Fix the KGW diff call to not vary as widely, and take a larger sample size than just a single block.
Fix the KGW diff call to not vary as widely, and take a larger sample size than just a single block.

Because PastBlocksMin always equated to 1, the sample was at a minimum of 1, which would cause a large spread on the difficulty depending on how close/far the last block was to the target time. This can be seen from the initial KGW implementation present in the parent commit. 1 sample is not enough to determine.

This commit has only been lightly tested and not done on a local chain fork for actual application testing.

drainx/1credit,drainx/1credit,drainx/1credit,drainx/1credit,drainx/1credit