Add sanity check after key generation

Add a sanity check to prevent cosmic rays from flipping a bit in the generated public key, or bugs in the elliptic curve code. This is simply done by signing a (randomized) message, and verifying the result.
Huh - I remember changing `GetRandBytes` to never fail, but stop with an assertion instead. There is no way bitcoin can handle a failing RNG gracefully. Seems that never got merged?