Equalised base algorithm from MillerRabin and MillerRabinParallelPrimes to make them comparable (especially removed the srand hand break from MillerRabin). Fixed some bugs.