copy: add logging for intermediate errors in --debug
copy: add logging for intermediate errors in --debug

The problem here is that we don't have a good way to distinguish between
the "the network didn't work at this address" error and the "the operation
actually failed" error.

The end result is that if the first address was the right one, but the
operation failed, we try to reconnect at an invalid address and end up with
a "websocket: bad handshake" error, with no way to debug what the actual
problem was. At least this way, we can have people pass --debug and see
what the real error was if they're hitting this case.

Signed-off-by: Tycho Andersen <10c18fcb898ee6b17d6575d444b125d10b3f4d6a@canonical.com>

mjeanson/lxd,georghopp/lxd,pcdummy/lxd,yura-pakhuchiy/lxd,atxwebs/lxd,Skarlso/lxd,chrisglass/lxd,chrisglass/lxd,ollie314/lxd,stgraber/lxd,dustinkirkland/lxd,yura-pakhuchiy/lxd,mjeanson/lxd,ollie314/lxd,lxc/lxd,lxc/lxd,akshaykarle/lxd,jsavikko/lxd,pcdummy/lxd,hallyn/lxd,akshaykarle/lxd,jsavikko/lxd,lxc/lxd,dustinkirkland/lxd,stgraber/lxd,georghopp/lxd,stgraber/lxd,chrisglass/lxd,erikmack/lxd,lxc/lxd,Skarlso/lxd,erikmack/lxd,stgraber/lxd,atxwebs/lxd,lxc/lxd,hallyn/lxd,pcdummy/lxd,lxc/lxd,hallyn/lxd,georghopp/lxd,stgraber/lxd,techtonik/lxd,lxc/lxd,hallyn/lxd,stgraber/lxd,techtonik/lxd,akshaykarle/lxd,hallyn/lxd,jsavikko/lxd,Skarlso/lxd,erikmack/lxd,mjeanson/lxd,atxwebs/lxd,dustinkirkland/lxd,yura-pakhuchiy/lxd,Skarlso/lxd,hallyn/lxd,ollie314/lxd,techtonik/lxd,stgraber/lxd,atxwebs/lxd