Make Juju retry apt-get commands.

https://bugs.launchpad.net/juju-core/+bug/1354685

This makes Juju retry apt-get commands. It uses the same back off algorithm as found in charm-helpers. Namely sleep 1s between a maximum of 30 attempts.
Injecting a different error is easy (thanks to `HookCommandOutput`) but trying to squeeze in a different `ProcessState.Sys()` is proving tricky. The `ProcessState` definition refers to `status` being a `syscall.WaitStatus` so I can't see how to make the tests override that. It also makes me question the necessity of checking the cast to `WaitStatus`.

Suggestions welcome!