Add a script to retry docker build steps. (Default 3 retries with 3 second backoff)

It seems like the race condition for running has been solved but not building in https://github.com/docker/docker/issues/4036 so we can retry building the docker instances. This will cause failed builds to fail 3x in a row. But with the caching it will only cause the failing step to fail 3 times and none of the other steps. 

@dirk-thomas for review