Upgrade to openssl-1.0.2a (Part1)
This is a resubmitted PR of #723. It still stays in 1.0.1m but requires the following 5 changes just before upgrading 1.0.2a.
- upgrade gyp to use else if conditions as supported in https://codereview.chromium.org/601353002
- refactor openssl.gyp so as to switch target_arch and OS with "else if" condition
- move sources, rules and defines into openssl.gypi, openssl-cli.gypi and masm_compile.gypi
- apply two private patches to fix gyp to run on MacOS without XCode and Fedor's fix for python2.6.
- add rsa and aes-gcm benchmarks and new hash algorithms in order to compare the performances after upgrade.
I confirmed there is no differences in out/deps/openssl/openssl.target.mk
with this changes on several platforms.
CI shows that there are a few new errors on win2008r2 but they are not related to this change. Others are fine except known failures. https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/430/
After this, I will submit the 2nd PR to finish upgrade to 1.0.2a in https://github.com/shigeki/io.js/tree/upgrade_openssl102a. Preliminary results to show performance gains after upgrade are in https://gist.github.com/shigeki/eefc31f9d82f45f9a8e3 .
R= @bnoordhuis @indutny