crypto: Improve error checking and reporting
crypto: Improve error checking and reporting

Added checks where necessary to prevent hard crashes and gave
precedence to returning the OpenSSL error strings instead of generic
error strings.

PR-URL: https://github.com/nodejs/node/pull/3753
Reviewed-By: Fedor Indutny <e39d94bae70283f13d24c278e04952d6dad9384b@indutny.com>
Reviewed-By: Shigeki Ohtsu <92fb37b64464f5ee20f58e183b0504024ecd6585@iij.ad.jp>
Reviewed-By: Michael Dawson <241bf52ebd97cc4ec83d57b04d1f9e9053df032e@ca.ibm.com>

dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node