RSA.generateKey: x4-7 speedup

* better trial division
* reduced number of Miller-Rabin rounds
* some minor changes