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.