check that the generated RSA key has the desired length

Before, it was possible that RSAGenerate generated a RSA key with a
public key of length B-1. For use cases that require specific bit
lengths (for example Certificate Authorities), that will not work.
The patch adds a check to the public key (n) bit length. If the length
is less than B (desired bit length), p and q are chosen again.