factor out creation of socket
Support $HTTPS_PROXY in Node DDP client.

This should mean that you can access the package server from behind a
corporate firewall.

I tested this by setting up a Linux machine that doesn't have access to
packages.meteor.com:

   $ sudo iptables -A OUTPUT -d 54.225.216.115 -j DROP
   $ sudo iptables -A OUTPUT -d 184.72.252.20 -j DROP
   $ sudo iptables -A OUTPUT -d 23.23.114.56 -j DROP

I confirmed that these commands both fail:

  $ curl https://packages.meteor.com/
  $ ./meteor search asdf   # when it needs to sync first

I bought a proxy server from Proxy Bonanza and confirmed that setting
the environment variable HTTPS_PROXY to
   https://PROXYUSERNAME:PROXYPASSWORD@PROXYIP:PROXYPORT/
made both of the commands above succeed.

Fixes #2515.
Merge remote-tracking branch 'origin/behind-proxy' into 0.9.4
Merge branch '0.9.4' into devel