Fix and simplify error handling in (RSA/EC_kmeth)_new_method()