Tweak the new difficulty parameters and add test.

New invariant: the difficulty of an algorithm cannot decrease when a block is solved using that algorithm.  Also increased the damping factor.  Simulation shows that difficulty remains relatively stable under constant hash rate, and adjusts quickly to sudden changes in the hashrate of one algorithm.