Add a dumb retry function in edeploy/functions

Some tools like pip, gem, git clone does not provide
a retry mechasim in case of network failure. This patch
comes with a dumb retry function in order to make
the SF build more resilient.

Also change $dir to ${dir} for better lisibility

Change-Id: Iebdabb477b775092d70680f0d6e99c930a97a3af
func-tests: remove SF_ROOT and SF_SUFFIX dependency

Change-Id: I9b80faf6670e6d2924fbc6f0eab78499aa71a959