[vcloud_director] get_network_complete

The existing get_network request method does not return the complete
network details provided by the API -- the parser is lossy. In addition, it
rewrites vCloud elements in a ruby-ish way, which then requires retranslation
to load back in the API.

It is not possible to adjust the get_network request without breaking code that
already depends on it (in particular, the current Network model), hence the need
for a tandem method.

The get_network_complete method returns in a format that should be loadable
into post_create_org_vdc_network, as suggested by API documentation.
[vcloud_director] Add tests and connect up get_network_complete
Add network model tests

Largely based on the vapp tests, except for explicitly
trying to find a suitable network to test against rather than
just blindly picking the first.

Test lazy loading is working, and that values loaded match
our data from the raw service request.

Lazy loading unfortunately complicates testing as per the
current implementation - determining that the loading has
happened is on a field-by-field basis, which leaves fields
that are undefined in vCloud in a 'NonLoaded' state. Possibly worth
revisiting this logic in a separate commit.
Don't read entire file into memory when saving to local blob storage. (local files)

We are using the local blobstore as a backend for concurrent uploads and
observed that memory was leaking quite quickly as GC cannot keep up.

So here, when the dest, src are  both local files, instead of calling
File.read, simply copy the file.
Namespace File
Use admin endpoint for get_network

API provides both api/admin/network and api/network for GET
request of the orgVdcNetwork. The admin endpoint also returns
the attached EdgeGateway, which comes in useful when re-writing
the output to POST back as a new network.
Switch network model over to get_network_complete

This has also fixed an issue where undefined attributes in the
request output were not being unmarked as NonLoaded. Test adjusted
accordingly.

In addition, highlighted that we need the ensure_list! hack on
IpRanges->IpRange.
Add Mock support to get_network_complete

which in turn re-enables Mock support in the network Model
Add deprecation warning for get_network

get_network is being deprecated in favour of get_network_complete,
which returns the complete GET-Network API response from vCloud.

This is a transitional step - see https://github.com/fog/fog/pull/2683

In a future release, get_network will be replaced with the logic from
get_network_complete, and then get_network_complete deprecated
accordingly.

The network Model has been updated to use get_network_complete already.

Any code that relies on existing get_network behaviour should be
updated to use get_network_complete or the Model asap.
Fix Ruby 1.8.7 hash key issue
Allow for specification of vcloud_token via ENV

This change permits the use of an external login method for vCloud
Director, relying on the fact that the password is only needed to
create a session in the API, subsequently accessed via the token.

In effect, this means that users do not need to store a valid
password in the FOG_RC, significantly reducing the risk footprint.

The default token lifetime is '30 minutes idle' - any activity
extends the life by another 30 mins. This makes this a very workable
solution for general user sessions.
Merge pull request #2703 from jdpaton/master

Don't read entire file into memory when saving to local blob storage.
Merge pull request #2705 from alphagov/vcloud_token_envvar

[vcloud_director] Allow for specification of vcloud_token via ENV
Merge pull request #2683 from alphagov/vcd_get_network_complete

[vcloud_director] Add get_network_complete non-lossy API request.
[vcloud] Remove helpless helper

Looks like this class is used to override Fog::Connection in testing
probably by manually tweaking the "false"

Since I'm deprecating Fog::Connection it's not worth keeping track off.
[core] Replace Fog::Connection with stable version

Fog::Connection mixed in XML parsing via the `parser` argument which
wasn't much use for the majority of APIs using JSON.

This adds the deprecation warning and attempts to update providers to
the correct version of Connection that they need.

Either the cleaner `Fog::Core::Connection` or if reliant on the XML
parsing still `Fog::XML::SAXParserConnection`

The SAX parser will be moving to `fog/xml` fairly soon.
Add Ruby 2.1.1 to testing matrix
Merge pull request #2709 from fog/add_2_1_1_to_travis

Add Ruby 2.1.1 to testing matrix
Merge pull request #2708 from fog/replace_fog_connection

[core] Replace Fog::Connection with stable version