apt: don't obscure unexpected type errors

Errors of unexpected type are being obscured,
and only their type being logged. This change
is to just annotate the error with its type.

We also add some testing of the apt-get install
retry logic. It's still not perfect, but it's
better.
Merge pull request #28 from axw/apt-retry-errors

apt: don't obscure unexpected type errors
Upcast uptime from syscall

On arm and i386 the uptime value is int32 rather than int64,
so upcast to satify the function return value.
Merge pull request #41 from bz2/upcast_uptime

Upcast uptime from syscall
jsonhttp: new package
Merge pull request #42 from rogpeppe/001-jsonhttp

jsonhttp: new package
jsonhttp: use correct errgo package
Merge pull request #43 from rogpeppe/002-fix-errgo-import

jsonhttp: use correct errgo package
update to use gopkg.in/errgo.v1
Merge pull request #44 from rogpeppe/003-errgo.v1

update to use gopkg.in/errgo.v1