test: introduce a helper that checks if crypto is available
test: introduce a helper that checks if crypto is available

since this applies to tls and https (among other things), it'll be used
for those tests as well. if we decouple the build system to somehow support
crypto but not tls, we could refine this.

PR-URL: https://github.com/iojs/io.js/pull/1049
Reviewed-By: Ben Noordhuis <59bd0a3ff43b32849b319e645d4798d8a5d1e889@bnoordhuis.nl>
Reviewed-By: Shigeki Ohtsu <92fb37b64464f5ee20f58e183b0504024ecd6585@iij.ad.jp>

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