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.
I'm fine with not testing the os.ProcessState.Sys().(syscall.WaitStatus) type assertion, but please leave the check in the code.