Crypto.RSA: Reenable the generate_key() compat function.

Also fixes some related warnings.