BigInteger: refactor randomPrime somewhat
Merge branch 'master' of https://github.com/phpseclib/phpseclib