Raise proper exceptions when verifying gems

When verifying an unsigned gem RubyGems would attempt to perform
verification as if the gem were signed even when it was not.

Now the signatures and certificate chain is checked for validity before
attempting to use either in the verification process.