Fix a non-deterministic test bug

Test was relying on map order.
Remove instance.(Wait)DNSName

Because we don't need them, and I'm sick of seeing them.
Merge pull request #38 from axw/remove-instance-dnsname

Because we don't need them, and I'm sick of seeing them.

Also, drive-by fix for a non-deterministic test that fails with Go 1.3 beta 2.
Cleaner agent status reporting

Machine and unit agent status is now reported under a separate "Agent"
struct. For compatibility reasons the existing agent status fields
have been left as is (but will eventually be removed). StatusData was
moved and only exists under Agent because it was recently added and
didn't make it in to any Juju release yet - there's no reason to
maintain backwards compatibility for that field.

If API versioning lands soon I will revisit this and remove field
duplication.

The main driver for this change is to allow clients to to easily
access the original status and info after the API has set the status
to StatusDown and munged the info string. These will be used by the
command line client in a later PR.
Merge pull request #51 from mjs/cleaner-agent-status

Machine and unit agent status is now reported under a separate "Agent"
struct. For compatibility reasons the existing agent status fields
have been left as is (but will eventually be removed). StatusData was
moved and only exists under Agent because it was recently added and
didn't make it in to any Juju release yet - there's no reason to
maintain backwards compatibility for that field.

If API versioning lands soon I will revisit this and remove field
duplication.

The main driver for this change is to allow clients to to easily
access the original status and info after the API has set the status
to StatusDown and munged the info string. These will be used by the
command line client in a later PR.
Integrated instance addresses and networks

Moved several items from the instance package
to the network/ package, renamed some
of them, and propagated the changes across:
 - instance.Address -> network.Address
 - instance.AddressType -> network.AddressType
 - instance.HostName -> network.HostName
 - instance.Ipv4Address -> network.IPv4Address
 - instance.Ipv6Address -> network.IPv6Address
 - instance.NetworkScope -> network.Scope
 - instance.Address.NetworkScope -> n.Address.Scope
 - instance.Network* -> network.Scope*
 - instance.NewAddress(es) -> network.NewAddress(es)
 - instance.HostPort -> network.HostPort
 - instance.Port -> network.Port
 - instance.Select*() -> network.Select*()
 - instance.SortPorts -> network.SortPorts

(I might have missed some, but you get the idea).

Also, some refactoring was done to split addresses and
ports implementation in separate files and test suites.

No other logic changes introduced - the rest is just
mechanically applying the changes above.

Moved environs/network to network/ and updated imports,
as suggested on the review.
Merge pull request #49 from dimitern/510-instance-addresses-and-networks-integration

Moved several items from the instance package
to the network/ package (used to be environs/network/),
renamed some of them, and propagated the changes across:
 - instance.Address -> network.Address
 - instance.AddressType -> network.AddressType
 - instance.HostName -> network.HostName
 - instance.Ipv4Address -> network.IPv4Address
 - instance.Ipv6Address -> network.IPv6Address
 - instance.NetworkScope -> network.Scope
 - instance.Address.NetworkScope -> n.Address.Scope
 - instance.Network* -> network.Scope*
 - instance.NewAddress(es) -> network.NewAddress(es)
 - instance.HostPort -> network.HostPort
 - instance.Port -> network.Port
 - instance.Select*() -> network.Select*()
 - instance.SortPorts -> network.SortPorts

(I might have missed some, but you get the idea).

Also, some refactoring was done to split addresses and
ports implementation in separate files and test suites.

No other logic changes introduced - the rest is just
mechanically applying the changes above.
Spread units across availability zones

Common code for ec2 and openstack, and any
other provider that supports availability
zones similarly.

Two top-level functions are added to
provider/common: BestAvailabilityZones and
DistributeInstances. The former returns the
availability zones with the fewest instances
in the specified group. The latter returns
the set of instances that may be added to
the specified group without reducing the
availability zone spread optimality.
provider/ec2: implement AZ spread

Implement common.ZonedEnviron, and call
the common BestAvailabilityZone and
DistributeInstances functions to implement
automatic availability zone spread.