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.
Please split this in multiple separate lines and checks (it might panic at least in two places like this):
```go
exitError, ok := err.(*exec.ExitError)
if !ok {
    err = fmt.Errorf("unexpected error type %T", err)
    break
}
waitStatus, ok := exitError.ProcessState.Sys().(syscall.WaitStatus)
if !ok {
    err = fmt.Errorf("unexpected process state type %T", exitError.ProcessState.Sys())
    break
}
if waitStatus.ExitStatus() != 100 {
    break
}
```