if EC_KEY_check_key fails consume errors off stack (+ add test)
Merge pull request #1398 from reaperhulk/fix-1389

if EC_KEY_check_key fails consume errors off stack (+ add test)