Key generation from secret: handle failure of point multiplication

Not all secrets produce a valid public key. If the BIGNUM derived
from the secret is not less than p for the secp256k1 curve then
point multiplication will fail, and no public key can be derived
from the secret.