Wrap tools download inside cloud init in a retry loop

Fixes: https://bugs.launchpad.net/bugs/1360994

Add a retry loop to the tools download command.
shquote isn't used in the template