Fixed pollardRho so that it tries many different startvalues before throwing giving up factorization. Ugly special case for factoring 4. Moved demonstration code from main to a new method.