Added simple Rabin miller primality check.