Revert to using curl to download tools

aria2 is in universe, which would preclude
juju from entering main. aria2 is also not
available on the test machines, and broke
CI. Revert to using curl, but cycle through
the URLs until one succeeds.

Fixes https://bugs.launchpad.net/juju-core/+bug/1364438
Merge pull request #661 from axw/lp1364438-curl-download-tools

Revert to using curl to download tools

aria2 is in universe, which would preclude
juju from entering main. aria2 is also not
available on the test machines, and broke
CI. Revert to using curl, but cycle through
the URLs until one succeeds.

Fixes https://bugs.launchpad.net/juju-core/+bug/1364438
Added error tracing using the errors package and more logging in hope of finding the cause for CI bugs
Merge pull request #666 from dimitern/more-logging-and-error-tracing-in-state

state: more error tracing and logging

Added error tracing using the errors package and more logging with the hope of finding the cause for CI bugs.

It does not fix lp:1348477 (auth fails), but hopefully will provide a lot more context why it happens on the bot.
ActionFinish in the API
address @fwereade's comments
line-wrap struct initialization