A proxy aware dialer introduced.

By default, if no proxy resolver function is set when creating the consumer, the 'http.ProxyFromEnvironment' proxy URL function will by used. The proxy URL function is resposible to provide the URL of the proxy server.

The URL will be used to establish a TCP connection to the proxy server following with a HTTP CONNECT request in order to establish a proxied connection to the loggregator server.

If no proxy URL is resolved or the target URL should not be proxied, dialer will fall back to 'net.Dial'.
Additional tests added to cover the following scenarios:
 1. configured proxy server is not running
 2. invalid proxy server URL configured
 3. incorrect URL configured, e.g. to a non-proxy server
 4. proxy server is refusing CONNECT requests
Added proxy cleanup to avoid test failures when randomized spec order is used.
The original test suite contained a bug (seed=1398192681 exposed the bug):

If after randomization any of the SortRecent tests will run first the global AfterEach closing the testServer will panic as the mentioned SortRecent tests do not instantiate a testServer.

Added a fix to check if the testServer has been instantiated.
Merge pull request #1 from michaljemala/cli-127

A proxy aware dialer. See https://github.com/cloudfoundry/cli/issues/127 for more info.