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.