Introduce apt-mirror config attribute

And propagate it through to environs/cloudinit.
Exluding provisioner tests for ppc and arm archs as gcc report compiler errors.

 GCC has been fixed but are not yet available.
cloudinit/sshinit: configure apt mirror

sshinit is updated to rewrite APT sources
if a mirror is specified. We perform the
same actions as cloud-init would perform,
but via shell commands instead of using
cloud-init directly.
Taken review comments into consideration.
Corrected format.
Merge pull request #891 from anastasiamac/Bug1378716

Exluding provisioner tests for ppc and arm archs as gcc report compiler ...

...errors.

 GCC has been fixed but are not yet available.
worker/uniter/jujuc: Fix TestAddMetric on gccgo

Change logic of add-metric command to avoid relying on map ordering
in tests, which is undefined and different on gccgo. Rather than
recording metrics as a map, keep it as a slice, but use a map when
parsing to check and error still on duplicate keys.

Also shortens error message on duplicate keys and makes output
from TestAddMetrics clearer.
Changed to ignore gccgo as build directive.
Merge pull request #897 from anastasiamac/Bug1378716

Changed to ignore gccgo as build directive.
Merge pull request #895 from bz2/test_add_metric_1379208

worker/uniter/jujuc: Fix TestAddMetric on gccgo

Change logic of add-metric command to avoid relying on map ordering
in tests, which is undefined and different on gccgo. Rather than
recording metrics as a map, keep it as a slice, but use a map when
parsing to check and error still on duplicate keys.

Also shortens error message on duplicate keys and makes output
from TestAddMetrics clearer.

http://reviews.vapour.ws/r/159/
apiserver/uniter: Fix TestAllMachinePorts on gccgo

Change port range related apis to return the results in sorted order.
This fixes a failing test when compiled with gccgo which was relying
on the insertion sort order of golang-go when checking results.
Merge pull request #898 from bz2/test_all_machine_ports_1379708

apiserver/uniter: Fix TestAllMachinePorts on gccgo

Change port range related apis to return the results in sorted order.
This fixes a failing test when compiled with gccgo which was relying
on the insertion sort order of golang-go when checking results.

http://reviews.vapour.ws/r/162/
Merge pull request #893 from axw/lp1364200-aptmirror-config

Introduce apt-mirror config

We introduce a new apt-mirror config attribute, and propagate
it through to environs/cloudinit. Bootstrap machines and manually
provisioned machines are configured using the updated cloudinit/sshinit,
and other machines are updated using the standard apt_mirror cloudinit
config.

Fixes https://bugs.launchpad.net/juju-core/+bug/1364200

http://reviews.vapour.ws/r/157/
tls.Config clients should use a meaningful ServerName
This also fixes an issue with the rsyslog tls.Config not using a ServerName at all.