Backport mocktest connection retries

backports https://github.com/jclouds/jclouds/pull/368