Corrections from round #1 of reviews.
Merge pull request #587 from wallyworld/nil-pointer-fixes

Nil pointer fixes

Fixes: https://bugs.launchpad.net/bugs/1358585

Add missing error handling.
Log ssh commands at trace level

Reduce noise for when we start
serialising tools in cloud-config.
Upgrade selection increments minor version by 1
cloudinit: s/AddFile/AddTextFile/, add AddBinaryFile
Merge pull request #577 from axw/environs-tools-archive

environs/tools: fix SHA256 summing

SHA256 summing of archives was totally
broken; summing the contents rather
than the resulting tgz file. Changed
Archive to just tgz, and added another
function to do the hash.
Merge pull request #586 from wallyworld/gomaasapi-rev53-trunk

Update dependencies to use gomaasapi rev 53

Fixes: https://bugs.launchpad.net/bugs/1190986
fix tests after merge
Merge pull request #590 from wallyworld/next-upgrade-version-trunk

Upgrade selection increments minor version by 1

Forward port from 1.20.

Fixes: https://bugs.launchpad.net/bugs/1359435
Use errors.Annotate
Change *everything* to errors.Annotate
Correct use of Annotate in a few places
Merge pull request #573 from axw/cloudinit-addfile-bytes

Change cloudinit.Config.AddFile to take []byte

In preparation for serialising tools in cloud-config for bootstrap
machines.

Also, log ssh commands at trace level

(Reduce noise for when we start serialising tools in cloud-config.)
Merge pull request #561 from voidspace/backup-ssh

Restore without access to state

juju-restore/restore: restore without access to the state.

Direct access to mongo via the state port will no longer be possible shortly. This PR changes restore to use the api instead of direct state access to get machine addresses (the only reason restore previously needed direct db access).
remove impossible test
fix misspelling
Merge pull request #576 from voidspace/db-shutoff-2

Shut-off direct database access

No longer expose port 37017 on machines, as direct mongo access is no longer required.

This is a repeat of PR 449 (effectively a revert of the revert).

https://github.com/juju/juju/pull/449/

This was reverted because restore still used direct state access. Once PR 561 has been merged direct DB access can be shutoff (again).

https://github.com/juju/juju/pull/561/
Corrections from round 2 of reviews.
Fixed nil-reference panic.
Skip obsolete test pending removal