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.
Merge pull request #1 from phillipp/master

Ensure that the generated RSA key has the desired length