improve error checking. set error code on error, and check malloc return.
add missing unlock in one case. ok lteo miod
check stack push return and make some effort to clean up. ok beck miod
convert CRYPTO_memcmp to timingsafe_memcmp based on current policy favoring
libc interfaces over libcrypto interfaces. for now we also prefer
timingsafe_memcmp over timingsafe_bcmp, even when the latter is acceptable.
ok beck deraadt matthew miod