Bring backwards-compatibility to `meteor bundle`

This commit introduces some conviluted logic to keep the old behavior of the
meteor bundle command. Hopefully we will drop it soon so we will simplify the
logic.
Fix failing meteor build self-test
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.