add rsa_generate_private_key function to replace RSAPrivateKey.generate

refs #1026. #1101 is dependent on this
Also, maybe `RSAPrivateKey.generate` should be changed to invoke this?