Cherry-pick platform module from master.
Fix jruby check for MRI 1.8.
Backport fix for :verify_ssl => true.
Backport ssl_verify_callback from master.
Fix integration tests for legacy & ruby 1.8.